Part Number Hot Search : 
KBJL810G SFH4590 A1200 BAS40T 101M10 INTER 6853M D74LVC
Product Description
Full Text Search
 

To Download MCP2221-IST Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2015 microchip technology inc. ds20005292b-page 1 mcp2221 features: universal serial bus (usb) ? supports full-speed usb (12 mb/s) ? implements usb protocol composite device: - communication device class (cdc) for usb-to-uart conversion - human interface device (hid) for i 2 c? device control and configuration ? 128-byte buffer to handle data throughput at any supported uart baud rate: - 64-byte transmit - 64-byte receive ? human interface device (hid) for both i 2 c communication and control: 64-byte buffer to handle data throughput at any i 2 c baud rate ? fully-configurable vid and pid assignments and string descriptors ? bus-powered or self-powered ? usb 2.0-compliant: tid# 40001594 usb driver and software support ? enumerates as a composite usb device (cdc and hid) using standard drivers for virtual com port (vcp) on the following windows ? operating systems: xp ? (sp3), vista ? , 7, 8 and 8.1 ? configuration utility for establishing a custom boot-up configuration ?i 2 c/smbus terminal ? windows dll cdc and universal asynchronous receiver/transmitter (uart) options ? communications device class (cdc) for the usb-to-uart option ? responds to set line coding commands to dynamically change baud rates ? supports baud rates: 300-115200 ?uart t x and r x pins only ? serial number used during the cdc enumeration can be enabled by using the microchip-provided configuration utility or by calling the proper api from the support libraries for this device i 2 c/smbus ? the device runs as an i 2 c master. the data to write/read on the i 2 c bus is conveyed by the usb interface. ?i 2 c master - up to 400 khz clock rate - supports 7- or 10-bit addressable devices; 10-bit addressable devices are supported through the pc host library - supports block reads/writes of up to 65,535 bytes long ? smbus master - supports all of the smbus transfers - smbus functionality is achieved through a combination of chip and support library processing - up to 400 khz clock rate general-purpose input/output (gpio) pins ? four general-purpose input/output pins ? all gp pins can be assigned to other functionalities other functionalities ? uart activity led outputs (ut x and ur x ) ? sspnd output pin ? usbcfg output pin (indicates when the enumeration has completed) ? three adc inputs ? one dac with two possible output options ? clock reference output: 12 mhz or other configurable values ? external interrupt edge detection other ? operating voltage: 3.0 to 5.5v ? electrostatic discharge (esd) protection: > 4 kv human body model (hbm) ? industrial (i) operating temperature: -40c to +85c usb 2.0 to i 2 c ? /uart protocol co nverter with gpio
mcp2221 ds20005292b-page 2 ? 2015 microchip technology inc. package types block diagram d- d+ v ss v dd mcp2221 pdip/soic/tssop 1 2 3 4 5 6 7 14 13 12 11 10 9 8 v usb rst ur x ut x gp2 gp3 sda scl mcp2221 4x4qfn* 1 2 4 3 5678 9 10 11 12 13 14 15 16 ep v dd nc ut x gp2 gp3 sda scl v usb d- d+ v ss nc gp1 gp0 ur x rst gp1 gp0 17 * includes exposed thermal pad (ep); see ta b l e 1 - 1 . usb hid usb cdc config i 2 c master uart bus matrix gpio adc/dac usb bus i 2 c bus t x d/r x d gp pins pin mux ioc clkr internal oscillator usb module & transceiver
? 2015 microchip technology inc. ds20005292b-page 3 mcp2221 1.0 functional description the mcp2221 is a usb-to-uart serial converter that enables usb connectivity in applications that have uart and/or i 2 c interfaces. the device reduces external components by integrating the usb termination resistors and the oscillator needed for usb operation. the mcp2221 has four gp pins for miscellaneous functionalities (including gpio, usbcfg, sspnd, clock output, adc, dac and interrupt detector). see tab l e 1 - 1 and section 1.7 ?pin mux module? for details about the pin functions. table 1-1: pinout description pin name pdip, soic, ssop qfn pin type standard function alternate functions gp0 2 1 i/o general-purpose i/o or alternate function pin sspnd (out) led_ur x (out) signals when the host has entered suspend mode uart r x led activity output (factory default) gp1 3 2 i/o general-purpose i/o or alternate function pin clkr (out) adc1 (in) led_ut x (out) ioc (in) clock reference output adc channel 1 uart t x led activity output (factory default) external interrupt edge detector rst 4 3 i reset input (with internal pull-up) n/a ur x 54iuart r x pin (input) n/a ut x 65ouart t x pin (output) n/a gp2 7 6 i/o general-purpose i/o or alternate function pin usbcfg (out) adc2 (in) dac1 (out) usb device configured status (factory default) adc channel 2 dac output 1 gp3 8 7 i/o general-purpose i/o or alternate function pin led_i2c (out) adc3 (in) dac2 (out) usb-i 2 c traffic indicator (factory default) adc channel 3 dac output 2 sda 9 8 i/o i 2 c data line n/a scl 10 9 i/o i 2 c clock line n/a v usb 11 10 usb usb power pin (internally connected to 3.3v) should be locally bypassed with a high-quality ceramic capacitor d- 12 11 usb usb d- d+ 13 12 usb usb d+ v ss 14 13 p ground nc ? 14 15 ? not connected v dd 116ppower ep ? 17 ? exposed thermal pad (ep) do not electrically connect.
mcp2221 ds20005292b-page 4 ? 2015 microchip technology inc. 1.1 supported operating systems the following operating systems are supported: ? windows ? xp (sp3), vista, 7, 8 and 8.1 ?linux ? ? any distribution with support for cdc and hid classes ?mac os ? ? all versions ? beginning with 10.7 1.1.1 enumeration the mcp2221 enumerates as a composite usb device after por. the device enumerates as both a human interface device (hid) for i 2 c, gpio control, and as cdc for the usb-to-uart converter. 1.1.1.1 usb hid the mcp2221 enumerates as an hid, so the device can be configured, while the i 2 c and gpio can be controlled. a dll package, with example applications and tools, is supplied by microchip on the device web page, on the microchip web site www.microchip.com . 1.1.1.2 usb cdc the cdc enumeration implements the usb-to-uart data translation. 1.2 bus-matrix module the bus-matrix module is the heart of the mcp2221. all other modules are tied together and controlled via the bus-matrix module. this module manages the data transfers between the usb and the uart, the i 2 c master module, as well as the command requests generated by the usb host controller and commands for controlling the function of the uart, gpio, adc, dac and clock output. 1.2.1 uart the control module interfaces to the uart and usb modules. 1.2.2 accessing the device the mcp2221 can be accessed for reading and writing via usb host commands. the device cannot be accessed or controlled via the uart interface. 1.3 uart interface the mcp2221 uart interface consists of the t x and r x data signals. the uart is configurable for several baud rates. the available baud rates are listed in ta b l e 1 - 2 . 1.3.1 get/set line coding the get_line_coding and set_line_coding commands are used to read and set the uart parameters while in operation. for example, terminal applications (e.g., putty, realterm, hyperterminal, etc.) send the set_line_command when connecting to the port. the mcp2221 responds by setting the baud rate only. the other parameters (data bits, parity, stop bits) remain unchanged. 1.3.1.1 rounding errors primary baud rate settings (with associated rounding errors) are shown in ta b l e 1 - 2 . if baud rates other than the ones shown in the table are used, the error percentage can be calculated using equation 1-1 to find the actual baud rate. equation 1-1: solving for actual baud rate 1.3.2 custom baud rates custom baud rates are configured by sending the set_line_coding usb command. see section 2.0 ?usb enumeration process? for more information. note: mcp2221 supports only eight data bits, no parity, and one stop bit. table 1-2: uart primary baud rates desired rate actual rate % error 300 300 0.00% 1200 1200 0.00% 2400 2400 0.00% 4800 4800 0.00% 9600 9600 0.00% 19200 19200 0.00% 38400 38339 0.16% 57600 57692 0.16% 115200 115385 0.16% actualrate 12mhz int x ?? ------------------ = where: x 12mhz desiredbaud ---------------------------------- - =
? 2015 microchip technology inc. ds20005292b-page 5 mcp2221 1.4 device configuration the mcp2221 keeps all the essential device configuration settings stored in flash memory. device configuration settings affect the way the mcp2221 behaves at run time. the settings are stored into the flash memory on the device. some of the settings are also copied into sram at power-up/reset. these device configuration settings reside in the following two distinct areas of flash memory: ? chip settings the chip settings area stores the key mcp2221 parameters ? usb parameters, adc/dac reference voltage choice, start-up dac value, clock reference output (clkr) frequency and duty cycle values. ? gp settings the gp settings area stores the gp designation settings. for gp settings that are assigned to gpio output operation, output values (logic 1 or 0 ) are also specified. even though the mcp2221 places a partial copy of the chip settings in sram, the following chip settings always reside in flash: ? usb manufacturer/product and serial number descriptors ? usb vid and pid pair ? usb options (e.g., the requested amount of current that is presented to the usb host during the usb enumeration process) 1.4.1 power-up/reset device configuration behavior at power-up/reset, the mcp2221 configures the device options (gp designation, special function pins parameters and usb enumeration options) according to the flash settings. then, the flash chip settings and gp settings are loaded into sram to allow for their temporary modification at run time. chip settings of the device configuration flash is copied partially into sram. only the run- time-modifiable parameters are copied into sram. gp settings of the device configuration flash (gp settings area) are copied entirely into the sram. by copying the gp settings completely into sram, the user is allowed to completely change the gp designation at run time. the sram copy of the settings can be altered at run time in order to change certain device behavior, e.g., gp designation (the gps can be re-assigned for a different type of operation than the one assigned at power-up) and special parameters (dac value, adc/dac voltage references, clock output value). figure 1-1: chip settings run time management the sram settings (gp and partial chip settings) can be modified through usb hid commands and they will have an effect on the following device features: ? gp pin designation (switch between gpio, dedicated or special functions modes) ? gpio direction and output value (only for gpio outputs) ? for the gps assigned to work in gpio mode ? clock output duty cycle and value ? if gp1 is assigned for clkr mode (clock reference output mode), by modifying the sram settings, the clock frequency and duty cycle can be changed at run time ? dac value and voltage reference used ? the dac value setting as well as the voltage reference used for it are stored in sram settings and they can be changed at run time. through this mechanism, at run time the user can change the dac value, as well as the voltage reference. ? adc voltage reference value ? the voltage reference used for adc conversions can be changed by altering its corresponding sram setting ? interrupt-on-change (ioc) detector settings ? if gp1 is assigned for ioc mode, the sram settings are used for setting up the triggers used for external interrupt detection (positive, negative edge detection or both) copy flash chip and gp settings to sram usb enumeration & configuration complete change the sram settings power-up/reset changes needed no yes sram settings
mcp2221 ds20005292b-page 6 ? 2015 microchip technology inc. 1.4.2 chip settings map the chip settings area resides in flash memory and is copied into sram at run time. not all of the device?s settings can be altered at run time. all the fields in the flash settings can be altered by the user. table 1-3: chip settings map byte index register name comments 0 chipsetting0 controls the usb cdc serial number enumeration, default state for the gp led designation, default state for gp dedicated-function pins and chip settings protection level 1 chipsetting1 default clock output divider and duty cycle 2 chipsetting2 dac reference options and default dac value 3 chipsetting3 adc reference and interrupt detection settings 4 usbvidl usb vid lower byte 5 usbvidh usb vid higher byte 6 usbpidl usb pid lower value 7 usbpidh usb pid higher byte 8 usbpwrattr usb power attributes 9 usbreqcrt usb required current 10 pass0 password byte 0 11 pass1 password byte 1 12 pass2 password byte 2 13 pass3 password byte 3 14 pass4 password byte 4 15 pass5 password byte 5 16 pass6 password byte 6 17 pass7 password byte 7
? 2015 microchip technology inc. ds20005292b-page 7 mcp2221 register 1-1: chipsetting0 register r/w-0 r/w-1 r/w-1 r/w-1 r/w-1 r/w-1 r/w-0 r/w-0 cdcsnen ledurxinst ledutxinst ledi2cinst sspndinst usbcfginst chipprot1 chipprot0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7 cdcsnen: usb cdc serial number enable 1 = usb cdc serial number is enumerated 0 = no usb cdc serial number enumeration (factory default) bit 6 ledurxinst: led uart r x inactive state 1 =led uart r x is inactive high and active low (factory default) 0 =led uart r x is inactive low and active high bit 5 ledutxinst: led uart t x inactive state 1 =led uart t x is inactive high and active low (factory default) 0 =led uart t x is inactive low and active high bit 4 ledi2cinst: led i 2 c inactive state 1 =led i 2 c is inactive high and active low (factory default) 0 =led i 2 c is inactive low and active high bit 3 sspndinst: sspnd inactive state 1 = sspnd is inactive high and active low (factory default) 0 = sspnd is inactive low and active high bit 2 usbcfginst: usbcfg inactive state 1 = usbcfg is inactive high and active low (factory default) 0 = usbcfg is inactive low and active high bit 1-0 chipprot<1:0>: chip settings protection level 11 = reserved 10 = permanently locked 01 = password protection 00 = chip settings unprotected (factory default)
mcp2221 ds20005292b-page 8 ? 2015 microchip technology inc. register 1-2: chipsetting1 register r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 ? ? ? clkdc1 clkdc0 clkdiv2 clkdiv1 clkdiv0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-5 reserved: set to ? 0 ? bit 4-3 clkdc<1:0>: clock-out duty-cycle 11 = duty cycle 75% (75% of 1 clock period is logic ? 1 ? and 25% of 1 clock period is logic ? 0 ?) 10 = duty cycle 50% (50% of 1 clock period is logic ? 1 ? and 50% of 1 clock period is logic ? 0 ?) (factory default) 01 = duty cycle 25% (25% of 1 clock period is logic ? 1 ? and 75% of 1 clock period is logic ? 0 ?) 00 = duty cycle 0% (100% of 1 clock period is logic ? 0 ?) bit 2-0 clkdiv<2:0>: clock-out divider output 111 = 375 khz clock output 110 = 750 khz clock output 101 = 1.5 mhz clock output 100 = 3 mhz clock output 011 = 6 mhz clock output 010 = 12 mhz clock output (factory default) 001 = 24 mhz clock output 000 =reserved register 1-3: chipsetting2 register r/w-1 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 dacvrm1 dacvrm0 dacref dacval4 dacval3 dacval2 dacval1 dacval0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-6 dacvrm<1:0>: dac internal voltage reference (dac vrm) selection 11 = vrm voltage is 4.096v (only if v dd is above this voltage) 10 = vrm voltage is 2.048v (factory default) 01 = vrm voltage is 1.024v 00 = vrm is off bit 5 dacref: dac reference output selection 1 = dac reference output is dac vrm voltage selection 0 = dac reference output is v dd (factory default) bit 4-0 dacval<4:0>: initial dac output value 5-bit value for the dac output (factory default is 8 decimal)
? 2015 microchip technology inc. ds20005292b-page 9 mcp2221 register 1-4: chipsetting3 register r/w-0 r/w-1 r/w-1 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 ? intdetfeen intdetreen adcvrm1 adcvrm0 adcref ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7 reserved: set to ? 0 ? bit 6 intdetfeen: interrupt falling edge detect enable 1 = interrupt detector will trigger when a falling edge is detected (factory default) 0 = falling edges will not trigger the detector bit 5 intdetreen: interrupt rising edge detect enable 1 = interrupt detector will trigger when a rising edge is detected (factory default) 0 = rising edges will not trigger the detector bit 4-3 adcvrm<1:0>: adc internal voltage reference (adc vrm) selection 11 = vrm voltage is 4.096v (only if v dd is above this voltage) 10 = vrm voltage is 2.048v 01 = vrm voltage is 1.024v (factory default) 00 = vrm is off bit 2 adcref: adc reference output selection 1 = adc reference output is adc vrm voltage selection (factory default) 0 = adc reference output is v dd bit 1-0 reserved: set to ? 0 ? register 1-5: usbvidl register r/w-1 r/w-1 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-0 usbvidl7 usbvidl6 usbvidl5 usbvidl4 u sbvidl3 usbvidl2 usbvidl1 usbvidl0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-0 usbvidl<7:0>: usb vid lower byte (factory default: 0xd8(hex)) register 1-6: usbvidh register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 usbvidh7 usbvidh6 usbvidh5 usbvidh4 usbvidh3 usbvidh2 usbvidh1 usbvidh0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-0 usbvidh<7:0>: usb vid higher byte (factory default: 0x04(hex))
mcp2221 ds20005292b-page 10 ? 2015 microchip technology inc. register 1-7: usbpidl register r/w-1 r/w-1 r/w-0 r/w-1 r/w-1 r/w-1 r/w-0 r/w-1 usbpidl7 usbpidl6 usbpidl5 usbpidl4 u sbpidl3 usbpidl2 usbpidl1 usbpidl0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-0 usbpidl<7:0>: usb pid lower byte (factory default: 0xdd(hex)) register 1-8: usbpidh register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 usbpidh7 usbpidh6 usbpidh5 usbpidh4 usbpidh3 usbpidh2 usbpidh1 usbpidh0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-0 usbpidh<7:0>: usb pid higher byte (factory default: 0x00(hex)) register 1-9: usbpwrattr register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? selfpwr remwkup ? ? ? ? ? bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7 reserved: reserved ? set to ? 1 ? (factory default) bit 6 selfpwr: usb self-powered attribute 1 = chip will enumerate on the usb bus as being self-powered 0 = chip will enumerate on the usb bus as being usb-bus powered (factory default) bit 5 remwkup: usb remote wake-up capability 1 = chip will enumerate on the usb bus as being able to wake up the usb host 0 = chip will enumerate as not being capable of remote wake-up of the usb host (factory default) bit 4-0 reserved: set all bits to ? 0 ? (factory default)
? 2015 microchip technology inc. ds20005292b-page 11 mcp2221 register 1-10: usbreqcrt register r/w-0 r/w-0 r/w-1 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 usbreqc rt7 usbreqcrt 6 usbreqcrt 5 usbreqcr t4 usbreqcr t3 usbreqcr t2 usbreqcr t1 usbreqc rt0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-0 usbreqcrt<7:0>: usb bus-powered required current amount (in units of 2 ma) factory default is 50 (decimal); the usb enumeration interprets this value as a current requirement of 100 ma. register 1-11: pass0 ? pass7 register r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 passx7 passx6 passx5 passx4 passx3 passx2 passx1 passx0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-0 passx<7:0>: password byte x value (factory default is 0 )
mcp2221 ds20005292b-page 12 ? 2015 microchip technology inc. 1.4.3 gp settings map the gp settings area resides in flash memory and is copied into sram at run time. the user can alter both the flash and the sram gp settings. any modification in the sram copy of the gp settings will have an immediate effect. the gp pins designation changes according to the new content of the sram settings. the flash variant of the settings will affect the power-up behavior of the gp pins. table 1-4: gp settings map byte index register name comments 0 gpsetting0 gp0 pin designation and gpio default output value, when gp is set for gpio output operation 1 gpsetting1 gp1 pin designation and gpio default output value, when gp is set for gpio output operation 2 gpsetting2 gp2 pin designation and gpio default output value, when gp is set for gpio output operation 3 gpsetting3 gp3 pin designation and gpio default output value, when gp is set for gpio output operation register 1-12: gpsetting0 register r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-0 ? ? ? gpiooutval gpiodir gpdes2 gpdes1 gpdes0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-5 reserved: set to ? 0 ? bit 4 gpiooutval: gpio output value (valid only when gp0 is set for gpio output operation) 1 = default output value is logic ? 1 ? (factory default) 0 = default output value is logic ? 0 ? bit 3 gpiodir: gpio direction (input or output; valid only when gp0 is set for gpio operation) 1 = gpio input 0 = gpio output (factory default) bit 2-0 gpdes<2:0>: gp0 designation 111 = reserved 110 = reserved 101 = reserved 100 = reserved 011 = reserved 010 = alternate function 0 (led uart r x ? ledurx) (factory default) 001 = dedicated function operation (sspnd) 000 = gpio operation (gpio0)
? 2015 microchip technology inc. ds20005292b-page 13 mcp2221 register 1-13: gpsetting1 register r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-1 r/w-1 ? ? ? gpiooutval gpiodir gpdes2 gpdes1 gpdes0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-5 reserved: set to ? 0 ? bit 4 gpiooutval: gpio output value (valid only when gp1 is set for gpio output operation) 1 = default output value is logic ? 1 ? (factory default) 0 = default output value is logic ? 0 ? bit 3 gpiodir: gpio direction (input or output; valid only when gp1 is set for gpio operation) 1 = gpio input 0 = gpio output (factory default) bit 2-0 gpdes<2:0>: gp1 designation 111 = reserved 110 = reserved 101 = reserved 100 = alternate function 2 (interrupt detector) 011 = alternate function 1 (led uart t x ? ledutx) (factory default) 010 = alternate function 0 (adc1) 001 = dedicated function operation (clock output) 000 = gpio operation (gpio1)
mcp2221 ds20005292b-page 14 ? 2015 microchip technology inc. register 1-14: gpsetting2 register r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 r/w-1 ? ? ? gpiooutval gpiodir gpdes2 gpdes1 gpdes0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-5 reserved: set to ? 0 ? bit 4 gpiooutval: gpio output value (valid only when gp2 is set for gpio output operation) 1 = default output value is logic ? 1 ? (factory default) 0 = default output value is logic ? 0 ? bit 3 gpiodir: gpio direction (input or output; valid only when gp2 is set for gpio operation) 1 = gpio input 0 = gpio output (factory default) bit 2-0 gpdes<2:0>: gp2 designation 111 = reserved 110 = reserved 101 = reserved 100 = reserved 011 = alternate function 1 (dac1) 010 = alternate function 0 (adc2) 001 = dedicated function operation (usbcfg) (factory default) 000 = gpio operation (gpio2)
? 2015 microchip technology inc. ds20005292b-page 15 mcp2221 register 1-15: gpsetting3 register r/w-0 r/w-0 r/w-0 r/w-1 r/w-0 r/w-0 r/w-0 r/w-1 ? ? ? gpiooutval gpiodir gpdes2 gpdes1 gpdes0 bit 7 bit 0 legend: r = readable bit w = writable bit u = unimplemented bit, read as ?0? -n = value at por ?1? = bit is set ?0? = bit is cleared x = bit is unknown bit 7-5 reserved: set to ? 0 ? bit 4 gpiooutval: gpio output value (valid only when gp3 is set for gpio output operation) 1 = default output value is logic ? 1 ? (factory default) 0 = default output value is logic ? 0 ? bit 3 gpiodir: gpio direction (input or output; valid only when gp3 is set for gpio operation) 1 = gpio input 0 = gpio output (factory default) bit 2-0 gpdes<2:0>: gp3 designation 111 = reserved 110 = reserved 101 = reserved 100 = reserved 011 = alternate function 1 (dac2) 010 = alternate function 0 (adc3) 001 = dedicated function operation (ledi2c) (factory default) 000 = gpio operation (gpio3)
mcp2221 ds20005292b-page 16 ? 2015 microchip technology inc. 1.5 usb module (hid, cdc and transceiver modules) the usb hid and cdc modules in the mcp2221 are full-speed usb 2.0-compliant. ? composite device (cdc + hid): - cdc: usb-to-uart communications - hid: i 2 c transactions, gpio control, configuration and miscellaneous operations (adc, dac, clock output) ? 128-byte buffer to handle data throughput at any uart baud rate: - 64-byte transmit - 64-byte receive ? fully configurable vid and pid assignments and descriptors (stored on-chip) ? bus-powered or self-powered 1.5.1 descriptors during configuration, the supplied pc interface stores the descriptors in the mcp2221. 1.5.2 suspend and resume the usb suspend and resume signals are supported for power management of the mcp2221. the device enters suspend mode when ?suspend signaling? is detected on the bus. the mcp2221 exits suspend mode when any of the following events occur: ? ?resume signaling? is detected or generated ? a usb ?reset? signal is detected ? a device reset occurs 1.6 usb transceiver the mcp2221 has a built-in usb 2.0 full-speed transceiver internally connected to the usb module. the usb transceiver obtains power from the v usb pin, which is internally connected to the 3.3v regulator. the best electrical signal quality is obtained when v usb is locally bypassed with a high-quality ceramic capacitor. 1.6.1 internal pull-up resistors the mcp2221 devices have built-in pull-up resistors designed to meet the requirements for full-speed usb. 1.6.2 mcp2221 power options the following are the main power options for the mcp2221: ? usb bus-powered (5v) ? 3.3v self-powered 1.6.2.1 internal power supply details mcp2221 offers various options for power supply. to meet the required usb signaling levels, the mcp2221 incorporates an internal ldo that is used solely by the usb transceiver to present the correct d+/d- voltage levels. figure 1-2 shows the internal connections of the usb transceiver ldo in relation to the v dd power supply rail. the output of the usb transceiver ldo is tied to the v usb line. a capacitor connected to the v usb pin is required if the usb transceiver ldo provides the 3.3v supply to the transceiver. figure 1-2: mcp2221 internal power supply details ldo 3.3v usb transceiver d+ v dd v usb d- in out
? 2015 microchip technology inc. ds20005292b-page 17 mcp2221 the provided v dd voltage has a direct influence on the voltage levels present on the gpio and uart t x /r x pins. when v dd is 5v, all of these pins will have a logical ? 1 ? around 5v with the variations specified in section 4.1 ?dc characteristics? . for applications that require a 3.3v logical ? 1 ? level, v dd must be connected to a power supply providing the 3.3v voltage. in this case, the internal usb transceiver ldo cannot provide the required 3.3v power. it is necessary to also connect the v usb pin of the mcp2221 to the 3.3v power supply rail. this way, the usb transceiver is powered up directly from the 3.3v power supply. 1.6.2.2 usb bus-powered (5v) in bus power only mode, all power for the application is drawn from the usb ( figure 1-3 ). this is effectively the simplest power method for the device. figure 1-3: bus power only in order to meet the inrush current requirements of the usb 2.0 specifications, the total effective capacitance appearing across v bus and ground must be no more than 10 f. if it is more than 10 f, some kind of inrush limiting is required. for more details on inrush current limiting, search for that subject in the latest ? universal serial bus specification? . according to the usb 2.0 specification, all usb devices must also support a low-power suspend mode. in the usb suspend mode, devices must consume no more than 500 a (or 2.5 ma for high-powered devices that are remote wake-up capable) from the 5v v bus line of the usb cable. the host signals the usb device to enter suspend mode by stopping all usb traffic to that device for more than 3 ms. the usb bus provides a 5v voltage. however, the usb transceiver requires 3.3v for the signaling (on d+ and d- lines). during usb suspend mode, the d+ or d- pull-up resistor must remain active, which will consume some of the allowed suspend current budget (500 a/2.5 ma). the v usb pin requires an external bypass capacitor with a value between 0.22 and 0.47 f (ceramic cap). figure 1-4 shows a circuit where mcp2221?s internal ldo is used to provide 3.3v to the usb transceiver. the voltage on the v dd affects the voltage levels onto the uart and gpio pins. with v dd at 5v, these pins will have a logic ? 1 ? of 5v with the variations specified in section 4.1 ?dc characteristics? . figure 1-4: typical power supply option using the 5v provided by the usb v dd v usb v ss v bus ldo 3.3v usb transceiver d+ v dd v usb d- in out 5v (usb bus) or external power supply
mcp2221 ds20005292b-page 18 ? 2015 microchip technology inc. 1.6.2.3 3.3v self-powered typically, many embedded applications are using 3.3v power supplies. when such option is available in the target system, mcp2221 can be powered up from the existing 3.3v power supply rail. the typical connections for mcp2221 are shown in figure 1-5 . in this example, mcp2221 has both v dd and v usb lines tied to the 3.3v rail. these tied connections disable the internal usb transceiver ldo of the mcp2221 to regulate the power supply on the v usb pin. another consequence is that the ? 1 ? logical level on the gpio pins will be at the 3.3v level, in accordance with the variations specified in section 4.1 ?dc characteristics? . 1.6.2.4 remote wake-up capability the mcp2221 offers a mechanism for triggering a remote wake-up event for the usb host. the remote wake-up trigger works only with the external interrupt detector. in order to use this capability, gp1 must be designated for interrupt detection operation. before the usb host goes into sleep/standby, the interrupt detector must be set up for detecting positive edges, negative edges or both; also, the detector flag must be cleared. after these conditions are met, the usb host can go into sleep/standby mode and it will be awakened whenever an external signal on gp1 triggers the interrupt detector. figure 1-5: using an externally provided 3.3v power supply 1.7 pin mux module the pin mux module offers multiple functionalities for the gp pins. 1.7.1 configurable pin functions the pins can be configured as: ? gpio ? individually configurable general-purpose input or output ? sspnd ? usb suspend state ? usbcfg ? indicates usb configuration status ? led_urx ? indicates uart receive traffic (when seen from the mcp2221) ? led_utx ? indicates uart transmit traffic (when seen from the mcp2221) ? led_i2c ? indicates i 2 c traffic ? adc1/2/3 ? analog inputs connected to the internal 10-bit adc ? dac1/2 ? analog outputs connected to the same 5-bit dac ? clkr ? digital clock output (the nominal value is 12 mhz, but other values are possible) ? ioc ? external interrupt detector 1.7.1.1 gpio pin function when the gpio pin function is enabled for a given gp(n) pin, it will operate as a digital input or an output pin. when configured as a digital output, its value is controlled through the usb hid commands. when configured as a digital input, its logic value is read using usb hid commands. 1.7.1.2 sspnd pin function the sspnd pin (if enabled) reflects the usb state (suspend/resume). the pin is active low (factory-default setting; see the chipsetting0 register for more details) when the suspend state has been issued by the usb host. likewise, the pin drives high after the resume state is achieved. this pin allows the application to go into low power mode when usb communication is suspended and switches to a full active state when usb activity is resumed. 1.7.1.3 usbcfg pin function the usbcfg pin (if enabled) starts out low (factory default setting; see the chipsetting0 register for more details) during power-up or after reset and goes high after the device successfully configures to the usb. the pin will go low when in suspend mode and high when the usb resumes. ldo 3.3v d+ v dd v usb d- in out 5v (usb bus) or external power supply external usb transceiver 3.3v ldo
? 2015 microchip technology inc. ds20005292b-page 19 mcp2221 1.7.1.4 led_urx the ?r x ? in this pin name refers to the uart of the mcp2221. the led_urx pin is an indicator of uart r x characters being received. this pin will pulse low or high (depending on the chip configuration settings; see the chipsetting0 register for more details) for a period of time (a few milliseconds). this allows the application to provide a visual indication of the uart r x traffic. 1.7.1.5 led_utx the ?t x ? in this pin name refers to the uart of the mcp2221. the led_utx pin is an indicator of uart t x characters being transmitted. this pin will pulse low or high (depending on the chip configuration settings; see the chipsetting0 register for more details) for a period of time (a few milliseconds). this allows the application to provide a visual indication of the uart t x traffic. 1.7.1.6 led_i2c the ?i2c? in this pin name refers to the i 2 c module in the mcp2221. the led_i2c pin is an indicator of i 2 c activity. this pin will pulse low or high (depending on the chip configuration settings; see the chipsetting0 register for details) for a period of time (a few milliseconds). this allows the application to provide a visual indication of the i 2 c traffic. 1.7.1.7 adc1/2/3 when gp1/2/3 are configured for adc operation, they will work as analog input pins and they are tied to the first three channels of the 10-bit adc in the mcp2221. 1.7.1.8 dac1/2 when gp2/3 are configured for dac operation, they will work as analog output pins and they are tied to the output of the mcp2221?s 5-bit dac. table 1-5: gp designation table gp designation bits <2:0> assignment gp0 gp1 gp2 gp3 000 gpio gpio gpio gpio gpio 001 dedicated_func sspnd clk out usbcfg led_i2c 010 alt_func_0 led_urx adc1 adc2 adc3 011 alt_func_1 ? led_utx dac1 dac2 100 alt_func_2 ? ioc ? ?
mcp2221 ds20005292b-page 20 ? 2015 microchip technology inc. 1.8 gpio/adc/dac module this module communicates with the usb hid sub-module through the bus matrix module. it allows the manipulation of gpios, retrieving the adc data and setting the dac value. 1.8.1 gpio when the gps are configured for gpio operation, those configured gps can be used as digital inputs or outputs. when working as outputs, the gps output logic levels (logic 0 or 1 ). 1.8.1.1 v rm the adc and dac sub-modules each have a voltage reference module (v rm ). each v rm can be configured (at power-up and run time) to output one of the four voltage choices available. the v rm can provide the following voltages as a reference: ?v dd ? the v rm output is exactly the voltage present at the v dd pin of the mcp2221. it can take any value from 3.3 to 5v. ? 1.024v ? the v rm output of 1.024v is obtained from an internal voltage reference ? 2.048v ? the v rm output of 2.048v is obtained from an internal voltage reference ? 4.096v ? the v rm output of 4.096v is obtained from an internal voltage reference. if the v dd is lower than 4.096v, the v rm output will have the value of v dd . 1.8.2 adc converter the adc converter is producing 10-bit values and it uses its own v rm module. it features three external channels (connected to gp1/2/3 if configured for adc operation). the sampling rate of the adc is around 1000 sps. figure 1-6: adc sub-module details 1.8.3 dac converter the dac is 5-bit wide, has a single analog output and it uses its own v rm module. the dac output voltage can be routed to gp2/3 (if gp2/3 are configured for dac operation). if the gp2 and gp3 are configured for dac operation, they will present the same analog voltage value because they are connected to the same dac output. figure 1-7: dac sub-module details 10-bit adc 3 ext. channels v rm off 1.024v 2.048v 4.096v 10-bit v dd chipsetting3<2> chipsetting3<4:3> analog mux value 5-bit dac 5-bit value v rm off 1.024v 2.048v 4.096v analog v dd chipsetting2<5> chipsetting2<7:6> analog mux output
? 2015 microchip technology inc. ds20005292b-page 21 mcp2221 1.9 clkr when gp1 is configured for clock output operation, the gp1 pin will act as a digital output, providing a clock signal derived from the device?s internal clock. the clock?s nominal frequency is 12 mhz 0.25%. other clock values and duty cycles are possible by setting different values that are associated with this mode of operation. 1.10 ioc when gp1 is configured for interrupt-on-change (ioc) operation, gp1 acts as a digital input that is sensitive to positive and negative edges. depending on the settings associated with this mode of operation, the gp1 can detect positive, negative or both edges. 1.11 reset/por 1.11.1 reset pin the rst pin provides a method for triggering an external reset of the device. a reset is generated by holding the pin low. these devices have a noise filter in the reset path, which detects and ignores small pulses. 1.11.2 por a por pulse is generated on-chip whenever v dd rises above a certain threshold. this allows the device to start in the initialized state when v dd is adequate for operation. to take advantage of the por circuitry, tie the rst pin to v dd through a resistor (1 ? 10 k ? ). this will eliminate external rc components usually needed to create a por delay. when the device starts normal operation (i.e., exits the reset condition), device operating parameters (voltage, frequency, temperature, etc.) must be met to ensure operation. if these conditions are not achieved, the device must be held in reset until the operating conditions are met. 1.12 internal oscillator the mcp2221 features an internal oscillator that provides a 12 mhz clock, which is needed for the usb modules (hid and cdc). full-speed usb is nominally 12 mb/s. the clock signal?s accuracy is over temp (2,500 ppm maximum). the internal clock of the mcp2221 is fed into the clkr module to provide a clock signal outside of the device. gp1 can be configured as a clock output pin providing a 12 mhz clock to the rest of the system. other clock and duty-cycle values are possible by using different settings for this module. 1.13 i 2 c? master module the i 2 c master module is responsible for the i 2 c traffic generation. the module is controlled through the usb hid, through the bus matrix module. the i 2 c module only implements the functionality of an i 2 c/smbus master. 1.13.1 i 2 c/smbus master the i 2 c master initiates all the i 2 c/smbus transactions (being read or write operations) on the bus. the i 2 c/smbus master module has the following capabilities: ? sending/receiving data at a multitude of bit rates, up to 400 kbps ? 7-bit addressing mode ? single data transfers of up to 65,535 bytes ? clock-stretching (it allows the slower i 2 c slaves to communicate) all the user data to be sent/transmitted over the i 2 c bus is conveyed to the usb host only through the usb hid interface. 1.14 bus matrix module the bus matrix module manages the communication between various functional modules, such as: usb (hid and cdc), i 2 c, uart, gpio/adc/dac, config, ioc, clkr, pin mux. 1.15 config module the config module is in charge of the storage of the device settings and also of their management (loading/modifying/access protection). the module uses non-volatile memory for storing the power-up device settings. at power-up, the module loads the settings from the non-volatile storage area into an sram location (volatile settings). these settings represent the device?s configuration, along with other key parameters (e.g., string descriptors, vid/pid, etc.). after the settings are loaded in sram (volatile settings), they can be changed through the usb hid interface. the user can read/modify/change either settings (nonvolatile or volatile) through the same interface (usb hid). the config module contains the relevant power-up settings that are used by the mcp2221. a few examples of settings are: usb descriptors, gp settings, adc, dac, clkr.
mcp2221 ds20005292b-page 22 ? 2015 microchip technology inc. 2.0 usb enumeration process the mcp2221 implements the cdc class to support the usb-to-uart protocol converter functionality. using usb-to-uart (cdc class) adapters with personal computers running the windows operating system (os) requires some consideration because of the way the windows os responds to their connection. when a usb-to-uart (cdc class) adapter is connected to the usb port of the pc, windows searches for a driver. after a suitable driver is found, the system creates an entry in the registry. the entry stores relevant information about the usb-to-uart adapter, its driver and the associated com port. the com port and its number are legacy-type adapters, which are still supported by windows os. historically, the com ports in a computer are part of the computer?s motherboard and are assigned a different index number. with the advent of usb-to-uart adapters, the windows os kept the com port concept and extended it to support the usb adapters. whenever a usb-to-uart adapter is first connected to a pc, the system searches the registry for an entry that is suitable for the connected adapter. if one is not found, the system asks for a suitable driver. if this step is completed, it creates a registry entry, and assigns a com port number as well. then, whenever the usb-to-uart adapter is connected to that pc, the system checks the registry entry, loads the specified driver and assigns the given com port number (as found in the registry entry). during the enumeration process, the device can specify a serial number. if it does, this number is stored in the registry entry and it is used to assign the same com port number to the adapter in question, no matter which usb port the adapter is connected to. usb-to-uart adapters have the option to not present a serial number during usb enumeration. in this case, the operating system would not be able to differentiate between two identical devices, if neither is providing its serial number. each time one of these two devices (with no serial number provided during enumeration) is connected to the same usb port, they will have the same com port number assigned. both functionalities (with or without serial numbers) are very useful for different applications. when the serial number is provided, an adapter using the mcp2221 solution receives the same com port number from a windows machine, no matter which usb port they are connected to. the case with no serial number is useful for test/validation of products using the mcp2221. the fact that all the tested boards are not supplying a serial number will force windows to assign them the same com port number (but only if connected to the same usb port). the mcp2221 is factory-set to not use a serial number. later in the process, if a customer wants the benefits provided by using a serial number, the configuration utility from microchip can be used to enable the mcp2221 to enumerate its serial number as well. the mcp2221 comes with a uniquely-provided serial number to be used during the usb enumeration process; however, this can be changed by the user in the configuration utility. the serial number enumeration enable/disable can be changed, as well, using the configuration utility. all the usb-related settings mentioned above are part of the device configuration (chip settings area) and they reside only in flash. when the chip settings area (1 st area) is being copied into the sram (at power-up), the usb settings are skipped (not copied into sram).
? 2015 microchip technology inc. ds20005292b-page 23 mcp2221 3.0 usb hid communication except for the usb cdc and uart modules, all the other modules in the mcp2221 use usb hid protocol for communication. the usb hid protocol uses 64-byte reports. a typical command exchange starts with a 64-byte packet that is written by the usb host (i.e., the pc). afterward, the usb host reads the response from the device as a 64-byte packet. 3.1 usb hid commands/responses 3.1.1 status/set parameters this command offers many options for this device. it is used to poll for the status of the device. it is also used to establish certain i 2 c bus parameters/conditions. table 3-1: command structure byte index function description value effect 0 0x10 status/set parameters ? command code 1 don?t care any value 2 cancel current i 2 c/smbus transfer (sub-command) 0x10 when this value is put in this field, the device will cancel the current i 2 c/smbus transfer and will attempt to free the i 2 c bus. this command is very useful since it can cancel a transfer and free the bus. an example would be when trying to communicate with a device using a wrong address. this will cause a timeout to occur. this timeout situation can be read using the ?status/set parameter? and the cancellation of the i 2 c/smbus transfer can be achieved by this sub-command. any other value no effect. 3set i 2 c/smbus communication speed (sub-command) 0x20 when this value is put in this field, the device will take the next command field and interpret it as the system clock divider that will give the i 2 c/smbus communication clock. any other value no effect. 4the i 2 c/smbus system clock divider that will be used to establish the communication speed the value in this field is being taken into consideration only when the byte index 3 contains the code for establishing a new communication speed. in all the other cases, this field?s value won?t matter. 5-63 don?t care any value
mcp2221 ds20005292b-page 24 ? 2015 microchip technology inc. 3.1.1.1 responses table 3-2: response 1 structure byte index function description value effect 0 0x10 status/set parameters ? command code echo 1 0x00 command completed successfully 2 cancel transfer 0x00 no special operation (i.e., cancel current i 2 c/smbus transfer) 0x10 the current i 2 c/smbus transfer was marked for cancellation. the actual i 2 c/smbus transfer cancellation and bus release will need some time (a few hundreds of microseconds, depending on the communication speed initially chosen for the canceled transfer) 0x11 the i 2 c engine (inside mcp2221) was already in idle mode. the cancellation command had no effect. 30x00no set i 2 c/smbus communication speed was issued. 0x20 the new i 2 c/smbus communication speed is now considered. 0x21 the i 2 c/smbus communication speed was not set (e.g., i 2 c transfer in progress). 4 the divider value given at the same index in the command field only in the case when the code for establishing a new communication speed is given at byte index 3. 0x00 when the communication speed is not being set. 5-7 don?t care any value 8 internal i 2 c state machine state value 9 lower byte (16-bit value) of the requested i 2 c transfer length 10 higher byte (16-bit value) of the requested i 2 c transfer length 11 lower byte (16-bit value) of the already transferred (through i 2 c) number of bytes 12 higher byte (16-bit value) of the already transferred (through i 2 c) number of bytes 13 internal i 2 c data buffer counter 14 current i 2 c communication speed divider value 15 current i 2 c timeout value 16 lower byte (16-bit value) of the i 2 c address being used 17 higher byte (16-bit value) of the i 2 c address being used 18-21 don?t care any value 22 scl line value ? as read from the pin
? 2015 microchip technology inc. ds20005292b-page 25 mcp2221 23 sda line value ? as read from the pin 24 interrupt edge detector state 0 or 1 25 i 2 c read pending value 0, 1 or 2 this field is used by the usb host to know if the mcp2221 still has to read from a slave device. 26-45 don?t care any value 46 mcp2221 hardware revision major (?a?) 47 mcp2221 hardware revision minor (?6?) 48 mcp2221 firmware revision major (?1?) 49 mcp2221 firmware revision minor (?1?) 50-55 adc data (16-bit) values. 3 x (16-bit) little-endian adc channel values (ch0 lsb, ch0 msb, ch1 lsb, ch1 m sb, ch2 lsb, ch2 msb). 56-63 don?t care any value table 3-2: response 1 structure (continued) byte index function description value effect
mcp2221 ds20005292b-page 26 ? 2015 microchip technology inc. 3.1.2 read flash data this command is used to read various important data structures and strings that are stored in flash memory on the mcp2221. 3.1.2.1 responses table 3-3: command structure byte index function description value effect 0 0xb0 read flash data ? command code 1 read flash data sub-code. the value in this field will instruct the mcp2221 on what flash data to be read. 0x00 read chip settings ? it will read the mcp2221 flash settings 0x01 read gp settings ? it will read the mcp2221 flash gp settings 0x02 read usb manufacturer descriptor string ? reads the usb manufacturer string descriptor used during the usb enumeration 0x03 read usb product descriptor string ? reads the usb product string descriptor used during the usb enumeration 0x04 read usb serial number descriptor string ? reads the usb serial number string descriptor that is used during usb enumeration. this serial number can be changed by the user through a specific usb hid command. 0x05 read chip factory serial number ? reads the factory-set serial number. this serial number cannot be changed. any other value no meaning. the device will reply with a code for an unsupported command at byte index 1 in the response report. 2-63 reserved 0x00 table 3-4: response structure byte index function description value effect 0 0xb0 read flash data ? command code 1 0x00 command completed successfully 0x01 command not supported 2 data structure length or don?t care 3-63 data or don?t care depends on the issued sub-command or the returned code at byte index 1
? 2015 microchip technology inc. ds20005292b-page 27 mcp2221 table 3-5: response structure ? read chip settings sub-command byte index function description value effect 0 0xb0 read flash data ? command code echo 1 0x00 command completed successfully 2 structure length 3don?t care 4 bit 7: cdc serial number enumeration enable 1 the usb serial number will be used during the usb enumeration of the cdc interface. 0 no serial number descriptor will be presented during the usb enumeration. bit 6: initial value for leduartrx pin option this value represents the logic level signaled when no uart r x activity takes places. when the uart r x (of the mcp2221) is receiving data, the leduartrx pin will take the negated value of this bit. bit 5: initial value for leduarttx pin option this value represents the logic level signaled when no uart t x transmission takes place. when the uart t x (of the mcp2221) is sending data, the leduarttx pin will take the negated value of this bit. bit 4: initial value for ledi2c pin option this value represents the logic level signaled when no i 2 c traffic occurs. when the i 2 c traffic is active, the ledi2c pin (if enabled) will take the negated value of this bit. bit 3: initial value for sspnd pin option this value represents the logic level signaled when the device is not in suspend mode. upon entering suspend mode, the sspnd pin (if enabled) will take the negated value of this bit. bit 2: initial value for usbcfg pin option this value represents the logic level signaled when the device is not usb configured. when the device will be usb configured, the usbcfg pin (if enabled) will take the negated value of this bit. bits 1-0: chip configuration security option 11 - 10 permanently locked 01 password-protected 00 unsecured 5 bits 7-5 don?t care bits 4-0: clock output divider value if the gp pin (exposing the clock output) is enabled for clock output operation, the divider value will be used on the 48 mhz usb internal clock and its divided output will be sent to this pin. 6 bits 7-6: dac reference voltage option 11 reference voltage is 4.096v (only if v dd is above this voltage) 10 reference voltage is 2.048v 01 reference voltage is 1.024v 00 reference voltage is off (this is useful for the case in which the dac uses other reference than v rm dac; e.g., v dd ) bit 5: dac reference option 1 dac reference is v rm dac voltage 0 dac reference is v dd bits 4-0: power-up dac value
mcp2221 ds20005292b-page 28 ? 2015 microchip technology inc. 7 bit 7 don?t care bit 6: interrupt detection ? negative edge if set, the interrupt detection flag will be set when a negative edge occurs. bit 5: interrupt detection ? positive edge if set, the interrupt detection flag will be set when a positive edge occurs. bit 4-3: adc reference voltage 11 reference voltage is 4.096v (only if v dd is above this voltage) 10 reference voltage is 2.048v 01 reference voltage is 1.024v 00 reference voltage is off (this is useful for the case in which the adc uses other reference than v rm adc; e.g., v dd ) bit 2 1 dac reference is v dd dac voltage 0 dac reference is v rm bit 1 don?t care bit 0 don?t care 8 lower byte of the 16-bit usb vid value 9 higher byte of the 16-bit usb vid value 10 lower byte of the 16-bit usb pid value 11 higher byte of the 16-bit usb pid value 12 usb power attributes ( 1 ) this value will be used by the mcp2221?s usb configuration descriptor (power attributes value) during the usb enumeration. 13 usb requested number of ma(s) ( 1 ) the requested ma value during the usb enumeration will represent the value at this index multiplied by 2. 14-63 don?t care note 1: please consult the usb 2.0 specification for details on the correct values for power and attributes table 3-5: response structure ? read chip settings sub-command (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 29 mcp2221 table 3-6: response structure ? read gp settings sub-command byte index function description value effect 0 0xb0 read flash data ? command code echo 1 0x00 command completed successfully 2 structure length 3 don?t care 4 gp0 power-up settings bit 7-5: don?t care bit 4: gpio output value when gp0 is set as an output gpio, this value will be present at the gp0 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp0 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp0 designation 111 - 011 don?t care 010 alternate function 0 (led uart rx) 001 dedicated function operation (sspnd) 000 gpio operation 5 gp1 power-up settings bits7-5: don?t care bit 4: gpio output value when gp1 is set as an output gpio, this value will be present at the gp1 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp0 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp1 designation 111 - 101 don?t care 001 dedicated function operation (clock output) 100 alternate function 2 (interrupt detection) 011 alternate function 1 (led uart tx) 010 alternate function 0 (adc1) 000 gpio operation 6 gp2 power-up settings bits7-5: don?t care bit 4: gpio output value when gp2 is set as an output gpio, this value will be present at the gp2 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp2 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp1 designation 111 - 100 don?t care 011 alternate function 1 (dac1) 010 alternate function 0 (adc2) 001 dedicated function operation (usb) 000 gpio operation
mcp2221 ds20005292b-page 30 ? 2015 microchip technology inc. 7 gp3 power-up settings bits7-5: don?t care bit 4: gpio output value when gp3 is set as an output gpio, this value will be present at the gp3 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp3 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp1 designation 111 - 100 don?t care 011 alternate function 1 (dac2) 010 alternate function 0 (adc3) 001 dedicated function operation (led i2c) 000 gpio operation 8-63 don?t care table 3-7: response structure ? read us b manufacturer descriptor string sub-command byte index value effect 0 0xb0 read flash data ? command code echo 1 0x00 command completed successfully 2 ( 2 ) number of bytes + 2 in the provided usb manufacturer descriptor string. the actual string starts at byte index 4. 3 0x03 the value at this index must always be 0x03. 4 + 2 x unicode_char_number + 0 ( 1 ) lower byte of the 16-bit unicode character. 4 + 2 x unicode_char_number + 1 ( 1 ) higher byte of the 16-bit unicode character. (4 + 2 x unicode_char_number + 2) - 63 ( 1 ) don?t care. only if the usb string descriptor is less than 60-bytes long in total. note 1: ?unicode_char_number? value starts from 0 to a maximum of 30 (included). 2: the value at byte index 2 must be 2 + 2 x (number of unicode characters in the string). table 3-8: response structure ? read usb product descriptor string sub-command byte index value effect 0 0xb0 read flash data ? command code echo 1 0x00 command completed successfully 2 ( 2 ) number of bytes + 2 in the provided usb product descriptor string. the actual string starts at byte index 4. 3 0x03 the value at this index must always be 0x03 4 + 2 x unicode_char_number + 0 ( 1 ) lower byte of the 16-bit unicode character. 4 + 2 x unicode_char_number + 1 ( 1 ) higher byte of the 16-bit unicode character. (4 + 2 x unicode_char_number + 2) - 63 ( 1 ) don?t care. only if the usb string descriptor is less than 60-bytes long (in total). note 1: ?unicode_char_number? value starts from 0 to a maximum of 30 (included). 2: the value at byte index 2 must be 2 + 2 x (number of unicode characters in the string). table 3-6: response structure ? read gp settings sub-command (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 31 mcp2221 table 3-9: response structure ? read usb serial number descriptor string sub-command byte index value effect 0 0xb0 read flash data ? command code echo 1 0x00 command completed successfully 2 ( 2 ) the number of bytes + 2 in the provided usb serial number descriptor string. the actual string starts at byte index 4 3 0x03 the value at this index must always be 0x03 4 + 2 x unicode_char_number + 0 ( 1 ) lower byte of the 16-bit unicode character 4 + 2 x unicode_char_number + 1 ( 1 ) higher byte of the 16-bit unicode character (4 + 2 x unicode_char_number + 2) - 63 ( 1 ) don?t care. only if the usb string descriptor is less than 60-bytes long in total. note 1: ?unicode_char_number? value starts from 0 to a maximum of 30 (included). 2: the value at byte index 2 must be 2 + 2 x (number of unicode characters in the string). table 3-10: response structure ? read chip factory serial number sub-command ( 1 ) byte index value effect 0 0xb0 read flash data ? command code echo 1 0x00 command completed successfully 2 structure length 3don?t care 4 - (4 + structure length - 1) structure data ? factory serial number string (4 + structure length) - 63 don?t care note 1: the chip serial number is typically 8 bytes in length.
mcp2221 ds20005292b-page 32 ? 2015 microchip technology inc. 3.1.3 write flash data this command is used to write various important data structures and strings into the flash memory of the device. table 3-11: command structure byte index function description value effect 0 0xb1 write flash data ? command code 1 write flash data sub-code. the value in this field will instruct the mcp2221 about the particular flash settings to be altered. 0x00 write chip settings ? it will write the mcp2221 flash settings 0x01 write gp settings ? it will write the mcp2221 flash gp settings 0x02 write usb manufacturer descriptor string ? writes the usb manufacturer string descriptor used during the usb enumeration 0x03 write usb product descriptor string ? writes the usb product string descriptor used during the usb enumeration 0x04 write usb serial number descriptor string ? writes the usb serial number string descriptor used during the usb enumeration any other value no meaning. the device will reply with a code for an unsupported command at byte index 1 in the response report. 2-63 data to be written data format depends on the write flash data sub-code (at byte index 1).
? 2015 microchip technology inc. ds20005292b-page 33 mcp2221 table 3-12: sub-command structure ? write chip settings sub-command byte index function description value effect 0 0xb1 write flash data ? command code 1 0x00 write chip settings ? it will write the mcp2221 flash device settings 2 bit 7: cdc serial number enumeration enable. 1 the usb serial number will be used during the usb enumeration of the cdc interface. 0 no serial number descriptor will be presented during the usb enumeration. bit 6: initial value for leduartrx pin option this value represents the logic level signaled when no uart rx activity takes places. when the uart rx (of the mcp2221) is receiving data, the leduartrx pin will take the negated value of this bit. bit 5: initial value for leduarttx pin option this value represents the logic level signaled when no uart tx transmission takes place. when the uart tx (of the mcp2221) is sending data, the leduarttx pin will take the negated value of this bit. bit 4: initial value for ledi2c pin option this value represents the logic level signaled when no i 2 c traffic occurs. when i 2 c traffic is active, the ledi2c pin (if enabled) will take the negated value of this bit. bit 3: initial value for sspnd pin option this value represents the logic level signaled when the device is not in suspend mode. upon entering suspend mode, the sspnd pin (if enabled) will take the negated value of this bit. bit 2: initial value for usbcfg pin option this value represents the logic level signaled when the device is not usb configured. when the device will be usb-configured, the usbcfg pin (if enabled) will take the negated value of this bit. bit 1-0: chip configuration security option 11 - 10 permanently locked 01 password-protected 00 unsecured 3bit 7-5 don?t care bit 4-0: clock output divider value if the gp pin (exposing the clock output) is enabled for clock output operation, the divider value will be used on the 48 mhz usb internal clock and its divided output will be sent to this pin. 4 bit 7-6: dac reference voltage option 11 reference voltage is 4.096v (only if v dd is above this voltage) 10 reference voltage is 2.048v 01 reference voltage is 1.024v 00 reference voltage is off (this is useful for the case in which the dac uses other reference than v rm dac, i.e., v dd ) bit 5: dac reference option 1 dac reference is v dd 0 dac reference is v rm dac voltage bit 4-0: power-up dac value
mcp2221 ds20005292b-page 34 ? 2015 microchip technology inc. 5 bit 7 don?t care bit 6: interrupt detection ? negative edge if set, the interrupt detection flag will be set when a negative edge occurs. bit 5: interrupt detection ? positive edge if set, the interrupt detection flag will be set when a positive edge occurs. bit 4-3: adc reference voltage 11 reference voltage is 4.096v (only if v dd is above this voltage). 10 reference voltage is 2.048v 01 reference voltage is 1.024v 00 reference voltage is off (this is useful for the case in which the adc uses other reference than v rm adc; e.g., v dd ) bit 2: adc reference option 1 adc reference voltage is v rm adc 0 adc reference voltage is v dd bit 1 don?t care bit 0 don?t care 6 lower byte of the 16-bit usb vid value. 7 higher byte of the 16-bit usb vid value. 8 lower byte of the 16-bit usb pid value. 9 higher byte of the 16-bit usb pid value. 10 usb power attributes this value will be used by the mcp2221?s usb configuration descriptor (power attributes value) during the usb enumeration. 11 usb requested number of ma(s) the requested ma value during the usb enumeration will represent the value at this index multiplied by 2. 12-19 8-bytes password (for flash modifications protection) 20-63 don?t care table 3-12: sub-command structure ? write chip settings sub-command byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 35 mcp2221 table 3-13: sub-command structure ? write gp settings sub-command byte index function description value effect 0 0xb1 write flash data ? command code 1 0x01 write gp settings ? it will write the mcp2221 flash gp settings 2 gp0 power-up settings bit 7-5: don?t care bit 4: gpio output value when gp0 is set as an output gpio, this value will be present at the gp0 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp0 is set for gpio operation. 1 gpio input mode 0 gpio output mode bit 2-0: gp0 designation 111 - 011 don?t care 010 dedicated function operation (sspnd) 001 alternate function 0 (led uart rx) 000 gpio operation 3 gp1 power-up settings bit 7-5: don?t care bit 4: gpio output value when gp1 is set as an output gpio, this value will be present at the gp1 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp1 is set for gpio operation. 1 gpio input mode 0 gpio output mode bit 2-0: gp1 designation 111 - 101 don?t care 100 alternate function 2 (interrupt detection) 011 alternate function1 (led uart tx) 010 alternate function 0 (adc1) 001 dedicated function operation (clock output) 000 gpio operation 4 gp2 power-up settings bit 7-5: don?t care bit 4: gpio output value when gp2 is set as an output gpio, this value will be present at the gp2 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp2 is set for gpio operation. 1 gpio input mode 0 gpio output mode bit 2-0: gp2 designation 111 - 100 don?t care 011 alternate function1 (dac1) 010 alternate function 0 (adc2) 001 dedicated function operation (clock output) 000 gpio operation
mcp2221 ds20005292b-page 36 ? 2015 microchip technology inc. 5 gp3 power-up settings bit 7-5: don?t care bit 4: gpio output value when gp3 is set as an output gpio, this value will be present at the gp2 pin at power-up/reset. bit 3: gpio direction (input/output) ? works only when gp3 is set for gpio operation. 1 gpio input mode 0 gpio output mode bit 2-0: gp3 designation 111 - 100 don?t care 011 alternate function 1 (dac2) 010 alternate function 0 (adc3) 001 dedicated function operation (led i2c) 000 gpio operation 6-63 don?t care table 3-14: sub-command structure ? write usb manufacturer descriptor string sub-command byte index value effect 0 0xb1 write flash data ? command code 1 0x02 write usb manufacturer descriptor string ? writes the usb manufacturer string descriptor used during the usb enumeration 2 ( 2 ) number of bytes + 2 in the provided usb serial number descriptor string 3 0x03 the value at this index must always be 0x03. 4 + 2 x unicode_char_number + 0 ( 1 ) lower byte of the 16-bit unicode character. 4 + 2 x unicode_char_number + 1 ( 1 ) higher byte of the 16-bit unicode character. note 1: ?unicode_char_number? value starts from 0 to a maximum of 30 (included). 2: the value at byte index 2 must be 2 + 2 x (number of unicode characters in the string). table 3-15: sub-command structure ? write usb product descriptor string sub-command byte index value effect 0 0xb1 write flash data ? command code 1 0x03 write usb product descriptor string ? writes the usb product string descriptor used during the usb enumeration 2 ( 2 ) number of bytes + 2 in the provided usb serial number descriptor string. the actual string starts at byte index 4. 3 0x03 the value at this index must always be 0x03. 4 + 2 x unicode_char_number + 0 ( 1 ) lower byte of the 16-bit unicode character 4 + 2 x unicode_char_number + 1 ( 1 ) higher byte of the 16-bit unicode character note 1: ?unicode_char_number? value starts from 0 to a maximum of 30 (included). 2: the value at byte index 2 must be 2 + 2 x (number of unicode characters in the string). table 3-13: sub-command structure ? write gp settings sub-command (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 37 mcp2221 3.1.3.1 responses table 3-16: sub-command structure ? write usb serial number descriptor string sub-command byte index value effect 0 0xb1 write flash data ? command code 1 0x04 write usb serial number descriptor string ? writes the usb serial number string descriptor used during the usb enumeration 2 ( 2 ) number of bytes + 2 in the provided usb serial number descriptor string. the actual string starts at byte index 4 3 0x03 the value at this index must always be 0x03. 4 + 2 x unicode_char_number + 0 ( 1 ) lower byte of the 16-bit unicode character 4 + 2 x unicode_char_number + 1 ( 1 ) higher byte of the 16-bit unicode character note 1: ?unicode_char_number? value starts from 0 to a maximum of 30 (included). 2: the value at byte index 2 must be 2 + 2 x (number of unicode characters in the string). table 3-17: response structure ? read chip factory serial number sub-command byte index value effect 0 0xb1 write flash data ? command code 1 0x00 command completed successfully 0x02 command not supported 0x03 command not allowed 2-63 don?t care
mcp2221 ds20005292b-page 38 ? 2015 microchip technology inc. 3.1.4 send flash access password this command is used to send a user-supplied password that will be compared to the one stored in the device?s flash when flash updates (chip/gp configuration, usb strings) are required and the flash data is password-protected. in the case where no protection mechanism is in place or the flash data has been permanently locked, this command has no meaning. 3.1.4.1 responses table 3-18: command structure byte index value effect 0 0xb2 send flash access password ? command code 1don?t care 2 password byte 1 3 password byte 2 4 password byte 3 5 password byte 4 6 password byte 5 7 password byte 6 8 password byte 7 9 password byte 8 10-63 don?t care table 3-19: response 1 structure byte index value effect 0 0xb2 send flash access password ? command code echo 1 0x00 command completed successfully 0x03 command not allowed (when the number of failed flash updates has been reached, no password will be accepted) 2-63 don?t care
? 2015 microchip technology inc. ds20005292b-page 39 mcp2221 3.1.5 i 2 c? write data this command is used to write user-given data to the i 2 c slave device (the speed is specified by the status/set parameters command). the command will have the following effects: ?the i 2 c engine will send the ?start? condition. ? the selected i 2 c slave address is sent next and the i 2 c engine will wait for the slave to send an acknowledge bit. ? the user data follows next and the i 2 c engine awaits for the acknowledge bit from the slave. ? if the requested length is more than 60 bytes, subsequent user bytes will be sent on the bus. ? when the user data length (being sent on the bus) reaches the requested length, the i 2 c engine will send the ?stop? condition on the bus. 3.1.5.1 responses table 3-20: command structure ( 1 ) byte index value effect 00x90 i 2 c write data ? command code 1 low byte requested i 2 c transfer length ? 16-bit value ? low byte 2 high byte requested i 2 c transfer length ? 16-bit value ? high byte 3i 2 c slave address 8-bit value representing the i 2 c slave address to communicate with (even ? address to write, odd ? address to read) ( note 2 ) 4-63 user data to be sent to the selected i 2 c slave device note 1: when the requested transfer length is more than 60 bytes, subsequent ?i 2 c write data? commands will transport the reminder of the user data (till the requested length). 2: the i 2 c slave address is represented on 8 bits, with even values for writes and odd for reads. to get the 8-bit address value out of a 7-bit address, the 7-bit value needs to be shifted left by 1 position. for write operations use the shifted value, while for reads add 1 to the shifted value. table 3-21: response 1 structure byte index value effect 00x90i 2 c write data ? command code echo 1 0x00 command completed successfully 0x01 i 2 c engine is busy (command not completed) 2 internal i 2 c engine state (at the moment the command was issued) ? useful for monitoring the status of the i 2 c engine 3-63 don?t care
mcp2221 ds20005292b-page 40 ? 2015 microchip technology inc. 3.1.6 i 2 c? write data repeated-start this command is used to write user-given data to the i 2 c slave device (the speed is specified by the status/set parameters command). the command will have the following effects: ?the i 2 c engine will send the ?repeated-start? condition. ? the selected i 2 c slave address is sent next and the i 2 c engine will wait for the slave to send an acknowledge bit. ? the user data follows next and the i 2 c engine waits for the acknowledge bit from the slave. ? if the requested length is more than 60 bytes, subsequent user bytes will be sent on the bus. ? when the user data length (being sent on the bus) reaches the requested length, the i 2 c engine will send the ?stop? condition on the bus. 3.1.6.1 responses table 3-22: command structure ( 1 ) byte index value effect 00x92 i 2 c write data repeated-start ? command code (ci2c_cmd_rstart_wrdata7) 1 low byte requested i 2 c transfer length ? 16-bit value ? low byte 2 high byte requested i 2 c transfer length ? 16-bit value ? high byte 3i 2 c slave address 8-bit value representing the i 2 c slave address to communicate with (even ? address to write, odd ? address to read) ( note 2 ) 4-63 user data to be sent to the selected i 2 c slave device note 1: when the requested transfer length is more than 60 bytes, subsequent ?i 2 c write data repeated-start? commands will transport the reminder of the user data (till the requested length). 2: the i 2 c slave address is represented on 8 bits, with even values for writes and odd for reads. to get the 8-bit address value out of a 7-bit address, the 7-bit value needs to be shifted left by 1 position. for write operations use the shifted value, while for reads add 1 to the shifted value. table 3-23: response 1 structure byte index value effect 00x92 i 2 c write data repeated-start ? command code echo (ci2c_cmd_rstart_wrdata7) 1 0x00 command completed successfully 0x01 i 2 c engine is busy (command not completed) 2 internal i 2 c engine state (at the moment the command was issued) ? useful for monitoring the status of the i 2 c engine 3-63 don?t care
? 2015 microchip technology inc. ds20005292b-page 41 mcp2221 3.1.7 i 2 c? write data no stop this command is used to write user-given data to the i 2 c slave device (the speed is specified by the status/set parameters command). the command will have the following effects: ?the i 2 c engine will send the ?start? condition. ? the selected i 2 c slave address is sent next and the i 2 c engine will wait for the slave to send an acknowledge bit. ? the user data follows next and the i 2 c engine waits for the acknowledge bit from the slave. ? if the requested length is more than 60 bytes, subsequent user bytes will be sent on the bus. ? when the user data length (being sent on the bus) reaches the requested length, the i 2 c engine will not send the ?stop? condition on the bus. 3.1.7.1 responses table 3-24: command structure ( 1 ) byte index value effect 00x94 i 2 c write data no stop ? command code 1 low byte requested i 2 c transfer length ? 16-bit value ? low byte 2 high byte requested i 2 c transfer length ? 16-bit value ? high byte 3i 2 c slave address 8-bit value representing the i 2 c slave address to communicate with (even ? address to write, odd ? address to read) ( note 2 ) 4-63 user data to be sent to the selected i 2 c slave device note 1: when the requested transfer length is more than 60 bytes, subsequent ?i 2 c write data no stop? com- mands will transport the reminder of the user data (till the requested length). 2: the i 2 c slave address is represented on 8 bits, with even values for writes and odd for reads. to get the 8-bit address value out of a 7-bit address, the 7-bit value needs to be shifted left by 1 position. for write operations use the shifted value, while for reads add 1 to the shifted value. table 3-25: response 1 structure byte index value effect 00x94 i 2 c write data no stop ? command code echo 1 0x00 command completed successfully 0x01 i 2 c engine is busy (command not completed) 2 internal i 2 c engine state (at the moment the command was issued) ? useful for monitoring the status of the i 2 c engine 3-63 don?t care
mcp2221 ds20005292b-page 42 ? 2015 microchip technology inc. 3.1.8 i 2 c? read data this command is used to read user-given data to the i 2 c slave device (the speed is specified by the status/set parameters command). the command will have the following effects: ?the i 2 c engine will send the ?start? condition. ? the selected i 2 c slave address is sent next and the i 2 c engine will wait for the slave to send an acknowledge bit. ? the user data is read next and the i 2 c engine sends the acknowledge bit to the slave. ? if the requested length is more than 60 bytes, subsequent user bytes will be read from the i 2 c slave on the bus. ? when the user data length (being sent on the bus) reaches the requested length, the i 2 c engine will send the ?stop? condition on the bus. 3.1.8.1 responses table 3-26: command structure byte index value effect 00x91 i 2 c read data ? command code 1 low byte requested i 2 c transfer length ? 16-bit value ? low byte 2 high byte requested i 2 c transfer length ? 16-bit value ? high byte 3i 2 c slave address 8-bit value representing the i 2 c slave address to communicate with (even ? address to write, odd ? address to read) ( note 1 ) 4-63 don?t care note 1: the i 2 c slave address is represented on 8 bits, with even values for writes and odd for reads. to get the 8-bit address value out of a 7-bit address, the 7-bit value needs to be shifted left by 1 position. for write operations use the shifted value, while for reads add 1 to the shifted value. table 3-27: response 1 structure byte index value effect 00x91 i 2 c read data ? command code echo 1 0x00 command completed successfully 0x01 i 2 c engine is busy (command not completed) 2 internal i 2 c engine state (at the moment the command was issued) ? useful for monitoring the i 2 c engine?s status 3-63 don?t care
? 2015 microchip technology inc. ds20005292b-page 43 mcp2221 3.1.9 i 2 c? read data repeated-start this command is used to read user-given data to the i 2 c slave device (the speed is specified by the status/set parameters command). the command will have the following effect: ?the i 2 c engine will send the ?repeated-start? condition. ? the selected i 2 c slave address is sent next and the i 2 c engine will wait for the slave to send an acknowledge bit. ? the user data is read next and the i 2 c engine sends the acknowledge bit to the slave. ? if the requested length is more than 60 bytes, subsequent user bytes will be read from the i 2 c slave on the bus. ? when the user data length (being sent on the bus) reaches the requested length, the i 2 c engine will send the ?stop? condition on the bus. 3.1.9.1 responses table 3-28: command structure byte index value effect 00x93 i 2 c read data repeated-start ? command code 1 low byte requested i 2 c transfer length ? 16-bit value ? low byte 2 high byte requested i 2 c transfer length ? 16-bit value ? high byte 3i 2 c slave address 8-bit value representing the i 2 c slave address to communicate with (even ? address to write, odd ? address to read) ( note 1 ) 4-63 don?t care note 1: the i 2 c slave address is represented on 8 bits, with even values for writes and odd for reads. to get the 8-bit address value out of a 7-bit address, the 7-bit value needs to be shifted left by 1 position. for write operations use the shifted value, while for reads add 1 to the shifted value. table 3-29: response 1 structure byte index value effect 0 0x93 i 2 c read data repeated-start ? command code echo 1 0x00 command completed successfully 0x01 i 2 c engine is busy (command not completed) 2 internal i 2 c engine state (at the moment the command was issued) ? useful for monitoring the status of the i 2 c engine 3-63 don?t care
mcp2221 ds20005292b-page 44 ? 2015 microchip technology inc. 3.1.10 i 2 c read data ? get i 2 c data this command is used to read back the data from the i 2 c slave device. 3.1.10.1 responses table 3-30: command structure byte index value effect 00x40 i 2 c read data ? get i 2 c data ? command code 1-63 don?t care table 3-31: response 1 structure byte index value effect 00x40 i 2 c read data ? get i 2 c data ? command code echo 1 0x00 command completed successfully 0x41 error reading the i 2 c slave data from the i 2 c engine 2 internal i 2 c engine state (at the moment the command was issued) ? useful for monitoring the i 2 c engine?s status 3 0-60 the number of read-back data bytes to follow in this packet: from 0 to a maximum of 60 bytes of read-back bytes 127 this value is signaled when an error has occurred and the following data should not be taken into account 4-63 user data or don?t care
? 2015 microchip technology inc. ds20005292b-page 45 mcp2221 3.1.11 set gpio output values this command is used to change the gpio output value for those gp pins assigned for gpio operation (gpio outputs). table 3-32: command structure byte index function description value effect 0 0x50 set gpio output values ? command code 1don?t care 2 alter gp0 output (enable/disable) 0x00 do not modify gp0 output (if gp0 is set as gpio output) any other value the next byte (index 3) will be the value used to set gp0 output (only if gp0 is set for gpio output) 3 gp0 output value 0x00 gp0 (if set up for gpio output operation) will take a logical value of ? 0 ? any other value gp0 (if set up for gpio output operation) will take a logical value of ? 1 ? 4 alter gp0 pin direction (enable/disable) 0x00 leave the gp0 gpio designation as is (input or output) any other value the next byte (index 5) will be the value used to set gp0?s pin direction (only if gp0 is set for gpio operation) 5 gp0 pin direction (input or output) 0x00 set gp0 gpio as output any other value gp0 (if set up for gpio operation) will be set as a digital input 6 alter gp1 output (enable/disable) 0x00 do not modify gp1 output (if gp1 is set as gpio output) any other value the next byte (index 7) will be the value used to set gp1 output (only if gp1 is set for gpio output) 7 gp1 output value 0x00 gp1 (if set up for gpio output operation) will take a logical value of ? 0 ? any other value gp1 (if set up for gpio output operation) will take a logical value of ? 1 ? 8 alter gp1 pin direction (enable/disable) 0x00 leave the gp1 gpio designation as is (input or output) any other value the next byte (index 9) will be the value used to set gp1?s pin direction (only if gp1 is set for gpio operation) 9 gp1 pin direction (input or output) 0x00 set gp1 gpio as output any other value gp1 (if set up for gpio operation) will be set as a digital input 10 alter gp2 output (enable/disable) 0x00 do not modify gp2 output (if gp2 is set as gpio output) any other value the next byte (index 11) will be the value used to set gp2 output (only if gp2 is set for gpio output) 11 gp2 output value 0x00 the gp2 (if gp2 is set up for gpio output operation) will take a logical value of ? 0 ? any other value gp2 (if gp2 is set up for gpio output operation) will take a logical value of ? 1 ? 12 alter gp2 pin direction (enable/disable) 0x00 leave the gp2 gpio designation as is (input or output) any other value the next byte (index 13) will be the value used to set gp2?s pin direction (only if gp2 is set for gpio operation) 13 gp2 pin direction (input or output) 0x00 set gp2 gpio as output any other value gp2 (if set up for gpio operation) will be set as a digital input 14 alter gp3 output (enable/disable) 0x00 do not modify gp3 output (if gp3 is set as gpio output) any other value the next byte (index 11) will be the value used to set gp3 output (only if gp3 is set for gpio output)
mcp2221 ds20005292b-page 46 ? 2015 microchip technology inc. 3.1.11.1 responses 15 gp3 output value 0x00 gp3 (if set up for gpio output operation) will take a logical value of ? 0 ?. any other value gp3 (if set up for gpio output operation) will take a logical value of ? 1 ? 16 alter gp3 pin direction (enable/disable) 0x00 leave the gp3 gpio designation as is (input or output) any other value the next byte (index 17) will be the value used to set gp3?s pin direction (only if gp3 is set for gpio operation) 17 gp3 pin direction (input or output) 0x00 set gp3 gpio as output any other value gp3 (if set up for gpio operation) will be set as a digital input 18-63 reserved 0x00 table 3-33: response 1 structure byte index function description value effect 0 0x50 set gpio output values ? command code 1 0x00 command completed successfully 2 alter gp0 output (enable/disable) status 0xee if gp0 is not set for gpio operation any other value if gp0 is already set for gpio operation, the value will be copied from the same byte index in the command structure 3 gp0 output value status 0xee if gp0 is not set for gpio operation any other value if gp0 is already set for gpio operation, the value will be copied from the same byte index in the command structure 4 alter gp0 pin direction (enable/disable) 0xee if gp0 is not set for gpio operation any other value if gp0 is already set for gpio operation, the value will be copied from the same byte index in the command structure 5 gp1 pin direction (input or output) 0xee if gp1 is not set for gpio operation any other value if gp1 is already set for gpio operation, the value will be copied from the same byte index in the command structure 6 alter gp1 output (enable/disable) status 0xee if gp1 is not set for gpio operation any other value if gp1 is already set for gpio operation, the value will be copied from the same byte index in the command structure 7 gp1 output value status 0xee if gp1 is not set for gpio operation any other value if gp1 is already set for gpio operation, the value will be copied from the same byte index in the command structure 8 alter gp1 pin direction (enable/disable) 0xee if gp1 is not set for gpio operation any other value if the gp1 is already set for gpio operation, the value will be copied from the same byte index in the command structure 9 gp1 pin direction (input or output) 0xee if gp1 is not set for gpio operation any other value if gp1 is already set for gpio operation, the value will be copied from the same byte index in the command structure 10 alter gp2 output (enable/disable) status 0xee if gp2 is not set for gpio operation any other value if gp2 is already set for gpio operation, the value will be copied from the same byte index in the command structure table 3-32: command structure (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 47 mcp2221 11 gp2 output value status 0xee if gp2 is not set for gpio operation any other value if gp2 is already set for gpio operation, the value will be copied from the same byte index in the command structure 12 alter gp2 pin direction (enable/disable) 0xee if gp2 is not set for gpio operation any other value if gp2 is already set for gpio operation, the value will be copied from the same byte index in the command structure 13 gp2 pin direction (input or output) 0xee if gp2 is not set for gpio operation any other value if gp2 is already set for gpio operation, the value will be copied from the same byte index in the command structure 14 alter gp3 output (enable/disable) status 0xee if gp3 is not set for gpio operation any other value if gp3 is already set for gpio operation, the value will be copied from the same byte index in the command structure 15 gp3 output value status 0xee if gp3 is not set for gpio operation any other value if gp3 is already set for gpio operation, the value will be copied from the same byte index in the command structure 16 alter gp3 pin direction (enable/disable) 0xee if gp3 is not set for gpio operation any other value if gp3 is already set for gpio operation, the value will be copied from the same byte index in the command structure 17 gp3 pin direction (input or output) 0xee if gp3 is not set for gpio operation any other value if gp3 is already set for gpio operation, the value will be copied from the same byte index in the command structure 18-63 don?t care table 3-33: response 1 structure (continued) byte index function description value effect
mcp2221 ds20005292b-page 48 ? 2015 microchip technology inc. 3.1.12 get gpio values this command is used to retrieve the gpio direction and pin value for those gp pins assigned for gpio operation (gpio inputs or outputs). 3.1.12.1 responses table 3-34: command structure byte index value effect 0 0x51 get gpio values ? command code 1-63 don?t care table 3-35: response 1 structure byte index function description value effect 0 0x51 get gpio values ? command code 1 0x00 command completed successfully 2 gp0 pin value 0xee if gp0 is not set for gpio operation other values (0x00 or 0x01) if gp0 is already set for gpio operation, the value represents the gp0 logic pin value 3gp0 direction value 0xef if gp0 is not set for gpio operation other values (0x00 or 0x01) if gp0 is already set for gpio operation, the value represents the gp0 pin designation (0x00 for output and 0x01 for input) 4 gp1 pin value 0xee if gp1 is not set for gpio operation other values (0x00 or 0x01) if gp1 is already set for gpio operation, the value represents the gp1 logic pin value 5gp1 direction value 0xef if gp1 is not set for gpio operation other values (0x00 or 0x01) if gp1 is already set for gpio operation, the value represents the gp1 pin designation (0x00 for output and 0x01 for input) 6 gp2 pin value 0xee if gp2 is not set for gpio operation other values (0x00 or 0x01) if gp2 is already set for gpio operation, the value represents the gp2 logic pin value 7gp2 direction value 0xef if gp2 is not set for gpio operation other values (0x00 or 0x01) if gp2 is already set for gpio operation, the value represents the gp2 pin designation (0x00 for output and 0x01 for input) 8 gp3 pin value 0xee if gp3 is not set for gpio operation other values (0x00 or 0x01) if gp3 is already set for gpio operation, the value represents the gp3 logic pin value 9gp3 direction value 0xef if gp3 is not set for gpio operation other values (0x00 or 0x01) if gp3 is already set for gpio operation, the value represents the gp3 pin designation (0x00 for output and 0x01 for input) 10-63 don?t care
? 2015 microchip technology inc. ds20005292b-page 49 mcp2221 3.1.13 set sram settings this command is used to alter various run time chip-settings. the altered settings reside in sram memory and they won?t affect the chip?s power-up/reset default settings. these altered settings will be active till the next chip power-up/reset. table 3-36: command structure byte index function description value effect 0 0x60 set sram settings ? command code 1don?t care 2 clock output divider value ? this allows the user to modify the clock output value on the fly, at run-time bit 7: enable loading of a new clock divider 1 the 4-0 bits will be loaded into the clock divider 0 clock divider value won?t be altered bit 6-5 don?t care bit 4-3: duty cycle 00 0% duty cycle 01 25% duty cycle 10 50% duty cycle 11 75% duty cycle bit 2-0: clock divider value 3 dac voltage reference ? this allows the user to modify the dac reference voltage bit 7: enable loading of a new dac reference 1 bits 2-0 will be used for dac reference voltage selection 0 dac reference will remain unaltered bit 6-3 don?t care bit 2-1: dac v rm voltage selection. these bits are used to change the dac v rm voltage 11 v rm voltage is 4.096v (only if v dd is higher than this value) 10 v rm voltage is 2.048v 01 v rm voltage is 1.024v 00 v rm voltage is off bit 0: this bit is used to change the dac reference voltage 1 dac voltage reference is the internal dac voltage reference module (dac v rm ) 0 dac voltage reference is v dd 4 set dac output value bit 7: enable loading of a new dac value 1 bits 4-0 will be used for dac reference voltage selection 0 the current dac value will remain unaltered bit 6-5 don?t care bit 4-0: the new dac value
mcp2221 ds20005292b-page 50 ? 2015 microchip technology inc. 5 adc voltage reference ? this allows the user to modify the adc reference voltage bit 7: enable loading of a new adc reference 1 bits 2-0 will be used for adc reference voltage selection 0 adc reference will remain unaltered bit 6-3 don?t care bit 2-1: these bits are used to change the dac v rm voltage 11 v rm voltage is 4.096v (only if v dd is higher than this value) 10 v rm voltage is 2.048v 01 v rm voltage is 1.024v 00 v rm voltage is off bit 0: this bit is used to change the dac reference voltage 1 v dd adc voltage reference is the internal adc voltage reference module (adc v rm ) 0 adc voltage reference is v dd 6 setup the interrupt detection mechanism and clear the detection flag ? useful for preparing the interrupt detection module to detect a new interrupt condition bit 7: enable the modification of the interrupt detection conditions 1 the interrupt detection settings and flag will change 0 the interrupt detection settings and flag will remain unchanged bit 6-5 don?t care bit 4 enable the modification of the positive edge detection bit 3: the new value for the positive edge detector 1 interrupt detection will trigger on positive edges 0 interrupt detection will not trigger on positive edges bit 2 enable the modification of the negative edge detection bit 1: the new value for the negative edge detector 1 interrupt detection will trigger on negative edges 0 interrupt detection will not trigger on negative edges bit 0: clear the interrupt detection flag 1 clear the interrupt detection flag 0 leave the interrupt detection flag as is 7 alter gpio configuration: alters the current gp designation 1 alter the gp designation. the values from byte index 8 will be used to load a new set of values into the sram gp settings. 0 do not alter the current gp designation 8 gp0 settings bit 7-5 don?t care bit 4: gpio output value when gp0 is set as an output gpio, this value will be present at the gp0 pin bit 3: gpio direction (input/output) ? works only when gp0 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp0 designation 111 - 011 don?t care 010 alternate function 0 (led uart rx) 001 dedicated function operation (sspnd) 000 gpio operation table 3-36: command structure (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 51 mcp2221 9 gp1 settings bit 7-5 don?t care bit 4: gpio output value when gp1 is set as an output gpio, this value will be present at the gp1 pin bit 3: gpio direction (input/output) ? works only when gp1 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp0 designation 111 - 101 don?t care 100 alternate function 2 (interrupt detection) 011 alternate function 1 (led uart tx) 010 alternate function 0 (adc1) 001 dedicated function operation (clock output) 000 gpio operation 10 gp2 settings bit 7-5 don?t care bit 4: gpio output value when gp2 is set as an output gpio, this value will be present at the gp2 pin bit 3: gpio direction (input/output) ? works only when gp2 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp2 designation 111 - 100 don?t care 011 alternate function 1 (dac1) 010 alternate function 0 (adc2) 001 dedicated function operation (usbcfg) 000 gpio operation 11 gp3 settings bit 7-5 don?t care bit 4: gpio output value when gp3 is set as an output gpio, this value will be present at the gp3 pin bit 3: gpio direction (input/output) ? works only when gp3 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp3 designation 111 - 100 don?t care 011 alternate function 1 (dac2) 010 alternate function 0 (adc3) 001 dedicated function operation (led i2c) 000 gpio operation 12-63 reserved 0x00 table 3-36: command structure (continued) byte index function description value effect
mcp2221 ds20005292b-page 52 ? 2015 microchip technology inc. 3.1.13.1 responses table 3-37: response 1 structure byte index value effect 0 0x60 set sram settings ? command code echo 1 0x00 command completed successfully 2-63 don?t care
? 2015 microchip technology inc. ds20005292b-page 53 mcp2221 3.1.14 get sram settings this command is used to retrieve the run time chip and gp settings. 3.1.14.1 responses table 3-38: command structure byte index value effect 0 0x61 get sram settings ? command code echo 1-63 0x00 command completed successfully table 3-39: response 1 structure byte index function description value effect 0 0x61 get sram settings ? command code echo 1 0x00 command completed successfully 2 length in bytes of the sram chip-settings area. 3 length in bytes of the sram gp settings area. 4 bit 7: cdc serial number enumeration enable 1 the usb serial number will be used during the usb enumeration of the cdc interface 0 no serial number descriptor will be presented during the usb enumeration bit 6: initial value for leduartrx pin option this value represents the logic level signaled when no uart rx activity takes places. when the uart rx (of the mcp2221) is receiving data, the leduartrx pin will take the negated value of this bit. bit 5: initial value for leduarttx pin option. this value represents the logic level signaled when no uart tx transmission takes place. when the uart tx (of the mcp2221) is sending data, the leduarttx pin will take the negated value of this bit. bit 4: initial value for ledi2c pin option this value represents the logic level signaled when no i 2 c traffic occurs. when i 2 c traffic is active, the ledi2c pin (if enabled) will take the negated value of this bit. bit 3: initial value for sspnd pin option this value represents the logic level signaled when the device is not in suspend mode. upon entering suspend mode, the sspnd pin (if enabled) will take the negated value of this bit. bit 2: initial value for usbcfg pin option this value represents the logic level signaled when the device is not usb configured. when the device will be usb-configured, the usbcfg pin (if enabled) will take the negated value of this bit. bit 1-0: chip configuration security option 10 permanently locked 01 password-protected 00 unsecured
mcp2221 ds20005292b-page 54 ? 2015 microchip technology inc. 5bit 7-5 don?t care bit 4-0: clock output divider value if the gp pin (exposing the clock output) is enabled for clock output operation, the divider value will be used on the 48 mhz usb internal clock and its divided output will be sent to this pin. (bits 4-3 for duty cycle and bits 2-0 for the clock divider.) 6 bit 7-6: dac reference voltage option 11 reference voltage is 4.096v 10 reference voltage is 2.048v 01 reference voltage is 1.024v 00 reference voltage is off (this is useful for the case in which the dac uses other reference than v rm dac; e.g., v dd ) bit 5: dac reference option 1 dac reference is v rm dac voltage 0 dac reference is v dd bit 4-0: power-up dac value 7bit 7 don?t care bit 6: interrupt detection ? negative edge if set, the interrupt detection flag will be set when a negative edge occurs bit 5: interrupt detection ? positive edge if set, the interrupt detection flag will be set when a positive edge occurs bit 4-3: adc reference voltage 11 reference voltage is 4.096v (only if v dd is above this voltage) 10 reference voltage is 2.048v 01 reference voltage is 1.024v 00 reference voltage is off (this is useful for the case in which the adc uses other reference than v rm dac; e.g., v dd ) bit 2: adc reference option 1 adc reference is v rm adc 0 adc reference is v dd bit 1 don?t care bit 2 don?t care 8 lower byte of the 16-bit usb vid value 9 higher byte of the 16-bit usb vid value 10 lower byte of the 16-bit usb pid value 11 higher byte of the 16-bit usb pid value 12 usb power attributes this value will be used by the mcp2221?s usb configuration descriptor (power attributes value) during the usb enumeration 13 usb requested number of ma(s) the requested ma value during the usb enumeration will represent the value at this index multiplied by 2 14 current supplied-password byte 1 15 current supplied-password byte 2 16 current supplied-password byte 3 table 3-39: response 1 structure (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 55 mcp2221 17 current supplied-password byte 4 18 current supplied-password byte 5 19 current supplied-password byte 6 20 current supplied-password byte 7 21 current supplied-password byte 8 22 gp0 settings bit 7-5 don?t care bit 4: gpio output value when the gp0 is set as an output gpio, this value will be present at the gp0 pin bit 3: gpio direction (input/output) ? works only when gp0 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp0 designation 111 - 011 don?t care 010 alternate function 0 (led uart rx) 001 dedicated function operation (sspnd) 000 gpio operation 23 gp1 settings bit 7-5 don?t care bit 4: gpio output value when the gp1 is set as an output gpio, this value will be present at the gp1 pin bit 3: gpio direction (input/output) ? works only when gp1 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp1 designation 111 - 101 don?t care 100 alternate function 2 (interrupt detection) 011 alternate function 1 (led uart tx) 010 alternate function 0 (adc1) 001 dedicated function operation (clock output) 000 gpio operation 24 gp2 settings bit 7-5 don?t care bit 4: gpio output value when the gp2 is set as an output gpio, this value will be present at the gp2 pin bit 3: gpio direction (input/output) ? works only when gp2 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp2 designation 111 - 100 don?t care 011 alternate function 1 (dac1) 010 alternate function 0 (adc2) 001 dedicated function operation (usbcfg) 000 gpio operation table 3-39: response 1 structure (continued) byte index function description value effect
mcp2221 ds20005292b-page 56 ? 2015 microchip technology inc. 25 gp3 settings bit 7-5 don?t care bit 4: gpio output value when the gp3 is set as an output gpio, this value will be present at the gp3 pin bit 3: gpio direction (input/output) ? works only when gp3 is set for gpio operation 1 gpio input mode 0 gpio output mode bit 2-0: gp3 designation 111 - 100 don?t care 011 alternate function 1 (dac2) 010 alternate function 0 (adc3) 001 dedicated function operation (led i2c) 000 gpio operation 26-63 don?t care table 3-39: response 1 structure (continued) byte index function description value effect
? 2015 microchip technology inc. ds20005292b-page 57 mcp2221 3.1.15 reset chip this command is used to force a reset of the mcp2221 device. this command is useful when the flash memory is updated with new data. the mcp2221 would need to be re-enumerated to see the new data. note: this command is the only command that does not expect a response. table 3-40: command structure byte index value effect 0 0x70 reset chip ? command code 10xab 20xcd 30xef 4-63 0x00 reserved
mcp2221 ds20005292b-page 58 ? 2015 microchip technology inc. notes:
? 2015 microchip technology inc. ds20005292b-page 59 mcp2221 4.0 electrical characteristics absolute maximum ratings (?)( 1 ) ambient temperature under bias................................................................................................. .............. -40c to +85c storage temperature ............................................................................................................ .................. -65c to +150c voltage on v dd with respect to v ss ......................................................................................................... -0.3v to +6.0v voltage on rst with respect to v ss ......................................................................................................... -0.3v to +9.0v voltage on v usb pin with respect to v ss .................................................................................................. -0.3v to +4.0v voltage on d+ and d- pins with respect to v ss ............................................................................ -0.3v to (v usb + 0.3v) voltage on all other pins with respect to v ss ................................................................................. -0.3v to (v dd + 0.3v) total power dissipation ( 2 ) ............................................................................................................................... ...... 800 mw maximum current out of v ss pin ........................................................................................................................... . 95 ma maximum current into v dd pin ........................................................................................................................... .... 95 ma clamp current, i k (v pin <0 or v pin >v dd ) ??????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????? ?? 20 ma maximum output current sunk by any i/o pin ..................................................................................... .................... 25 ma maximum output current sourced by any i/o pin .................................................................................. .................. 25 ma maximum current sunk by all ports .............................................................................................. ........................... 90 ma maximum current sourced by all ports ........................................................................................... ........................ 90 ma note 1: v usb must always be ? v dd +0.3v. 2: power dissipation is calculated as follows: p dis =v dd x{i dd ? ? i oh } + ? {(v dd ? v oh )xi oh }+ ? (v ol xi ol ). ? notice: stresses above those listed under ?absolute maximum ratings? may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. exposure above maximum rating conditions for extended periods may affect device reliability.
mcp2221 ds20005292b-page 60 ? 2015 microchip technology inc. 4.1 dc characteristics dc characteristics operating conditions (unless otherwise indicated): 3.0v ?? v dd ? 5.5v at -40 ? c ? t a ? +85 ? c (i-temp) param. no. characteristic sym. min. typ. max. units conditions d001 supply voltage v dd 3.0 ? 5.5 v por release voltage v por 1.6 v por rearm voltage 0.8 v d003 v dd rise rate to ensure por sv dd 0.05 ? ? v/ms design guidance only not tested d004 supply current i dd v dd =3.0v ? 10 12 ma f osc =12mhz, (330 nf on v usb ) v dd =5.0v ? 13 15 ma d005 standby current i dds ?46?a input low-voltage d031 schmitt trigger (urx) v il ??0.2v dd v3.0v ?? v dd ? 5.5v ttl (gp pins) ? ? 0.8 4.5v ?? v dd ? 5.5v input high-voltage d041 schmitt trigger (urx) v ih 0.8 v dd ?v dd v3.0v ?? v dd ? 5.5v ttl (gp pins) 2.0 ? v dd 4.5v ?? v dd ? 5.5v input leakage current d060 gp, urx i il ? 50 100 na v ss ?? v pin ?? v dd , pin at hi-z output low-voltage d080 gp, utx v ol ??0.6vi ol = 8.0 ma, v dd =5.0v ??0.6 i ol = 6.0 ma, v dd =3.3v output high-voltage d090 gp, utx v oh v dd ?0.7 ? ? v i oh =-3.5ma, v dd =5.0v v dd ?0.7 ? ? i oh =-3.0ma, v dd =3.3v capacitive loading specs on output pins d102 gpio c io ??50pf note 1 note 1: characterized only, not 100% tested.
? 2015 microchip technology inc. ds20005292b-page 61 mcp2221 figure 4-1: por and por rearm with slow rising v dd v dd v por v porr v ss v ss npor ( 1 ) t por ( 3 ) por rearm note 1: when npor is low, the device is held in reset. 2: t por 1 s typical. 3: t vlow 2.7 s typical. t vlow ( 2 ) table 4-1: usb modul e specifications dc characteristics operating conditions (unless otherwise indicated): 3.0v ? v dd ? 5.5v at -40c ? t a ? +85c (i-temp) param. no. characteristic sym. min. typ. max. units conditions d313 usb voltage v usb 3.0 ? 3.6 v voltage on the v usb pin must be in this range for proper usb operation d314 input leakage on pin i il ??1 av ss ? v pin ? v dd pin at high impedance d315 input low voltage for usb buffer v ilusb ??0.8vfor v usb range d316 input high voltage for usb buffer v ihusb 2.0 ? ? v for v usb range d318 differential input sensitivity v difs ? ? 0.2 v the difference between d+ and d- must exceed this value while v cm is met d319 differential common mode range v cm 0.8 ? 2.5 v d320 driver output impedance ( 1 ) z out 28 ? 44 w d321 voltage output low v ol 0.0 ? 0.3 v 1.5 k ? load connected to 3.6v d322 voltage output high v oh 2.8 ? 3.6 v 1.5 k ? load connected to ground note 1: the d+ and d- signal lines have been built-in impedance matching resistors. no external resistors, capacitors or magnetic components are necessary on the d+/d- signal paths between the mcp2221 family device and the usb cable.
mcp2221 ds20005292b-page 62 ? 2015 microchip technology inc. table 4-2: thermal considerations standard operating conditions (unless otherwise stated) operating temperature: -40 ? c ? t a ? +85 ? c (i-temp) param. no. sym. characteristic typ. units conditions th01 ja thermal resistance junction to ambient 70 ? c/w 14-pin pdip package 95.3 ? c/w 14-pin soic package 100 ? c/w 14-pin tssop package 45.7 ? c/w 16-pin qfn 4 x 4 mm package th02 jc thermal resistance junction to case 32 ? c/w 14-pin pdip package 31 ? c/w 14-pin soic package 24.4 ? c/w 14-pin tssop package 6.3 ? c/w 16-pin qfn 4 x 4 mm package th03 t jmax maximum junction temperature +150 ? c th04 pd power dissipation ? w pd = p internal +p i / o th05 p internal internal power dissipation ? w p internal =i dd xv dd ( 1 ) th06 p i / o i/o power dissipation ? w p i / o = ? (i ol xv ol )+ ? (i oh x(v dd ?v oh )) th07 p der derated power ? w p der =pd max (t j ?t a )/ ja ( 2 , 3 ) note 1: i dd is the current to run the device alone without driving any load on the output pins. 2: t a = ambient temperature. 3: t j = junction temperature.
? 2015 microchip technology inc. ds20005292b-page 63 mcp2221 4.2 ac characteristics 4.2.1 timing parameter symbology the timing parameter symbols have been created in one of the following formats: 4.2.2 timing conditions the operating temperature and voltage specified in table 4-3 apply to all timing specifications, unless otherwise noted. figure 4-2 specifies the load conditions for the timing specifications. table 4-3: temperature and volt age specifications ? ac figure 4-2: load conditions for device timing specifications 1. tpps2pps 2. tpps t f frequency t time e error lowercase letters (pp) and their meanings: pp io input or output pin osc oscillator rx receive tx transmit bitclk rx/tx bitclk rst reset drt device reset timer uppercase letters and their meanings: s ffall pperiod hhigh rrise i invalid (high-impedance) v valid l low z high-impedance ac characteristics standard operating conditions (unless otherwise stated) operating temperature -40 ? c ? t a ? +85 ? c operating voltage v dd range as described in dc spec, section 4.1 ?dc characteristics? . 50 pf pin
mcp2221 ds20005292b-page 64 ? 2015 microchip technology inc. 4.2.3 timing diagrams and specifications table 4-4: reset, oscillator start-up timer and power-up timer parameters standard operating conditions (unless otherwise stated) operating temperature: -40c ?? t a ?? +85c param no. sym. characteristic min. typ. ? max. units conditions 30 t rst rst pulse width (low) 2 ? ? s 31 t pwrt power-up timer 40 65 140 ms 32 t ost oscillator start-up time ? 1024 ? t ost * these parameters are characterized but not tested. ? data in the ?typ.? column is at 5v, +25c, unless otherwise stated. these parameters are for design guidance only and are not tested.
? 2015 microchip technology inc. ds20005292b-page 65 mcp2221 5.0 packaging information 5.1 package marking information legend: xx...x customer-specific information y year code (last digit of calendar year) yy year code (last 2 digits of calendar year) ww week code (week of january 1 is week ?01?) nnn alphanumeric traceability code pb-free jedec designator for matte tin (sn) * this package is pb-free. the pb-free jedec designator ( ) can be found on the outer packaging for this package. note : in the event the full microchip part number cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information. 3 e 3 e 14-lead pdip (300 mil) example 14-lead soic (3.90 mm) example 14-lead tssop (4.4 mm) example yyww nnn xxxxxxxx 16-lead qfn (4x4x0.9 mm) example pin 1 pin 1 mcp2221 i/p ^^ 1448256 3 e mcp2221 i/sl 1448256 2221st 1448 256 2221 i/ml ^^ 448256 3 e
mcp2221 ds20005292b-page 66 ? 2015 microchip technology inc. n e1 d note 1 12 3 e c eb a2 l a a1 b1 be
? 2015 microchip technology inc. ds20005292b-page 67 mcp2221 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
mcp2221 ds20005292b-page 68 ? 2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
? 2015 microchip technology inc. ds20005292b-page 69 mcp2221
mcp2221 ds20005292b-page 70 ? 2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
? 2015 microchip technology inc. ds20005292b-page 71 mcp2221 note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
mcp2221 ds20005292b-page 72 ? 2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
? 2015 microchip technology inc. ds20005292b-page 73 mcp2221 d e n 2 1 exposed pad d2 e2 2 1 e b k n note 1 a3 a1 a l top view bottom view
mcp2221 ds20005292b-page 74 ? 2015 microchip technology inc. note: for the most current package drawings, please see the microchip packaging specification located at http://www.microchip.com/packaging
? 2015 microchip technology inc. ds20005292b-page 75 mcp2221 appendix a: revision history revision b (february 2015) 1. updated bit settings in registers 1-1 to 1-7 , register 1-10 and registers 1-12 , 1-13 , 1-14 , 1-15 . revision a (may 2014) original release of this document.
mcp2221 ds20005292b-page 76 ? 2015 microchip technology inc. notes:
? 2015 microchip technology inc. ds20005292b-page 77 mcp2221 product identification system to order or obtain information, e.g., on pricing or delivery, contact your local microchip sales office . device: mcp2221: usb-to-i 2 c/uart protocol converter mcp2221t: usb-to-i 2 c/uart protocol converter (tape and reel) temperature range: i= -40 ? c to +85 ? c (industrial) package: ml = plastic quad flat, no lead package ? 4x4x0.9 mm body (qfn), 16-lead p = plastic dual in line, 300 mil. body (pdip), 14-lead sl = plastic small outline ? narrow, 3.90 mm body (soic), 14-lead st = plastic thin shrink small outline ? 4.4 mm body (tssop), 14-lead examples: a) mcp2221- i/p: industrial temperature, 14ld pdip package a) mcp2221- i/sl: industrial temperature, 14ld soic package b) mcp2221t- i/sl: tape and reel, industrial temperature, 14ld soic package a) mcp2221- i/st: industrial temperature, 14ld tssop package b) mcp2221t- i/st: tape and reel, industrial temperature, 14ld tssop package a) mcp2221- i/ml: industrial temperature, 16ld 4x4 qfn package b) mcp2221t- i/ml: tape and reel, industrial temperature, 16ld 4x4 qfn package part no. x /xx package temperature range device [x] ( 1 ) tape and reel option note 1: tape and reel identifier only appears in the catalog part number description. this identifier is used for ordering purposes and is not printed on the device package. check with your microchip sales office for package availability with the tape and reel option.
mcp2221 ds20005292b-page 78 ? 2015 microchip technology inc. notes:
? 2015 microchip technology inc. ds20005292b-page 79 information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. it is your responsibility to ensure that your application meets with your specifications. microchip makes no representations or warranties of any kind whether express or implied, written or oral, statutory or otherwise, related to the information, including but not limited to its condition, quality, performance, merchantability or fitness for purpose . microchip disclaims all liability arising from this information and its use. use of microchip devices in life support and/or safety applications is entirely at the buyer?s risk, and the buyer agrees to defend, indemnify and hold harmless microchip from any and all damages, claims, suits, or expenses resulting from such use. no licenses are conveyed, implicitly or otherwise, under any microchip intellectual property rights. trademarks the microchip name and logo, the microchip logo, dspic, flashflex, flexpwr, jukeblox, k ee l oq , k ee l oq logo, kleer, lancheck, medialb, most, most logo, mplab, optolyzer, pic, picstart, pic 32 logo, righttouch, spynic, sst, sst logo, superflash and uni/o are registered trademarks of microchip tec hnology incorporated in the u.s.a. and other countries. the embedded control solutions company and mtouch are registered trademarks of microchip technology incorporated in the u.s.a. analog-for-the-digital age, bodycom, chipkit, chipkit logo, codeguard, dspicdem, dspicdem.net, ecan, in-circuit serial programming, icsp, inter-chip connectivity, kleernet, kleernet logo, miwi, mpasm, mpf, mplab certified logo, mplib, mplink, multitrak, netdetach, omniscient code generation, picdem, picdem.net, pickit, pictail, righttouch logo, real ice, sqi, serial quad i/o, total endurance, tsharc, usbcheck, varisense, viewspan, wiperlock, wireless dna, and zena are trademarks of microchip technology incorporated in the u.s.a. and other countries. sqtp is a service mark of microchip technology incorporated in the u.s.a. silicon storage technology is a registered trademark of microchip technology inc. in other countries. gestic is a registered trademar ks of microchip technology germany ii gmbh & co. kg, a subsidiary of microchip technology inc., in other countries. all other trademarks mentioned herein are property of their respective companies. ? 2015, microchip technology incorporated, printed in the u.s.a., all rights reserved. isbn: 978-1-63277-016-5 note the following details of the code protection feature on microchip devices: ? microchip products meet the specification cont ained in their particular microchip data sheet. ? microchip believes that its family of products is one of the most secure families of its kind on the market today, when used i n the intended manner and under normal conditions. ? there are dishonest and possibly illegal methods used to breach the code protection feature. all of these methods, to our knowledge, require using the microchip produc ts in a manner outside the operating specif ications contained in microchip?s data sheets. most likely, the person doing so is engaged in theft of intellectual property. ? microchip is willing to work with the customer who is concerned about the integrity of their code. ? neither microchip nor any other semiconduc tor manufacturer can guarantee the security of their code. code protection does not mean that we are guaranteeing the product as ?unbreakable.? code protection is constantly evolving. we at microchip are co mmitted to continuously improvin g the code protection features of our products. attempts to break microchip?s code protection feature may be a violation of the digital millennium copyright act. if such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that act. microchip received iso/ts-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona; gresham, oregon and design centers in california and india. the company?s quality system processes and procedures are for its pic ? mcus and dspic ? dscs, k ee l oq ? code hopping devices, serial eeproms, microperipherals, nonvolatile memory and analog products. in addition, microchip?s quality system for the design and manufacture of development systems is iso 9001:2000 certified. quality management s ystem certified by dnv == iso/ts 16949 ==
ds20005292b-page 80 ? 2015 microchip technology inc. americas corporate office 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-792-7200 fax: 480-792-7277 technical support: http://www.microchip.com/ support web address: www.microchip.com atlanta duluth, ga tel: 678-957-9614 fax: 678-957-1455 austin, tx tel: 512-257-3370 boston westborough, ma tel: 774-760-0087 fax: 774-760-0088 chicago itasca, il tel: 630-285-0071 fax: 630-285-0075 cleveland independence, oh tel: 216-447-0464 fax: 216-447-0643 dallas addison, tx tel: 972-818-7423 fax: 972-818-2924 detroit novi, mi tel: 248-848-4000 houston, tx tel: 281-894-5983 indianapolis noblesville, in tel: 317-773-8323 fax: 317-773-5453 los angeles mission viejo, ca tel: 949-462-9523 fax: 949-462-9608 new york, ny tel: 631-435-6000 san jose, ca tel: 408-735-9110 canada - toronto tel: 905-673-0699 fax: 905-673-6509 asia/pacific asia pacific office suites 3707-14, 37th floor tower 6, the gateway harbour city, kowloon hong kong tel: 852-2943-5100 fax: 852-2401-3431 australia - sydney tel: 61-2-9868-6733 fax: 61-2-9868-6755 china - beijing tel: 86-10-8569-7000 fax: 86-10-8528-2104 china - chengdu tel: 86-28-8665-5511 fax: 86-28-8665-7889 china - chongqing tel: 86-23-8980-9588 fax: 86-23-8980-9500 china - dongguan tel: 86-769-8702-9880 china - hangzhou tel: 86-571-8792-8115 fax: 86-571-8792-8116 china - hong kong sar tel: 852-2943-5100 fax: 852-2401-3431 china - nanjing tel: 86-25-8473-2460 fax: 86-25-8473-2470 china - qingdao tel: 86-532-8502-7355 fax: 86-532-8502-7205 china - shanghai tel: 86-21-5407-5533 fax: 86-21-5407-5066 china - shenyang tel: 86-24-2334-2829 fax: 86-24-2334-2393 china - shenzhen tel: 86-755-8864-2200 fax: 86-755-8203-1760 china - wuhan tel: 86-27-5980-5300 fax: 86-27-5980-5118 china - xian tel: 86-29-8833-7252 fax: 86-29-8833-7256 asia/pacific china - xiamen tel: 86-592-2388138 fax: 86-592-2388130 china - zhuhai tel: 86-756-3210040 fax: 86-756-3210049 india - bangalore tel: 91-80-3090-4444 fax: 91-80-3090-4123 india - new delhi tel: 91-11-4160-8631 fax: 91-11-4160-8632 india - pune tel: 91-20-3019-1500 japan - osaka tel: 81-6-6152-7160 fax: 81-6-6152-9310 japan - tokyo tel: 81-3-6880- 3770 fax: 81-3-6880-3771 korea - daegu tel: 82-53-744-4301 fax: 82-53-744-4302 korea - seoul tel: 82-2-554-7200 fax: 82-2-558-5932 or 82-2-558-5934 malaysia - kuala lumpur tel: 60-3-6201-9857 fax: 60-3-6201-9859 malaysia - penang tel: 60-4-227-8870 fax: 60-4-227-4068 philippines - manila tel: 63-2-634-9065 fax: 63-2-634-9069 singapore tel: 65-6334-8870 fax: 65-6334-8850 taiwan - hsin chu tel: 886-3-5778-366 fax: 886-3-5770-955 taiwan - kaohsiung tel: 886-7-213-7828 taiwan - taipei tel: 886-2-2508-8600 fax: 886-2-2508-0102 thailand - bangkok tel: 66-2-694-1351 fax: 66-2-694-1350 europe austria - wels tel: 43-7242-2244-39 fax: 43-7242-2244-393 denmark - copenhagen tel: 45-4450-2828 fax: 45-4485-2829 france - paris tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany - dusseldorf tel: 49-2129-3766400 germany - munich tel: 49-89-627-144-0 fax: 49-89-627-144-44 germany - pforzheim tel: 49-7231-424750 italy - milan tel: 39-0331-742611 fax: 39-0331-466781 italy - venice tel: 39-049-7625286 netherlands - drunen tel: 31-416-690399 fax: 31-416-690340 poland - warsaw tel: 48-22-3325737 spain - madrid tel: 34-91-708-08-90 fax: 34-91-708-08-91 sweden - stockholm tel: 46-8-5090-4654 uk - wokingham tel: 44-118-921-5800 fax: 44-118-921-5820 worldwide sales and service 01/27/15


▲Up To Search▲   

 
Price & Availability of MCP2221-IST

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X